Bug 339194 - I can't print the value X-Axis related with the max value of Y-Axis, into a label
Summary: I can't print the value X-Axis related with the max value of Y-Axis, into a l...
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: view objects (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-19 03:58 UTC by Agustin
Modified: 2014-11-09 08:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agustin 2014-09-19 03:58:56 UTC
I can't print the value X-Axis related with the max value of Y-Axis, into a label. How can I do it?
My kst version is 2.0.x.

Thanks

Reproducible: Always
Comment 1 Nicolas Brisset 2014-09-19 06:20:01 UTC
Interesting request. This is not the first time we have this, see bug #135090.
Now that indexed access into vectors works, it sounds like a good idea to add the MinIndex and MaxIndex scalars to vectors, which should be fairly easy.
Comment 2 Netterfield 2014-11-09 08:12:40 UTC
Git commit a319703a76e27b30b3b6c122c708583132421939 by Barth Netterfield.
Committed on 09/11/2014 at 07:59.
Pushed by netterfield into branch 'master'.

Vectors get iMax and iMin scalars
Now you can use the index of the max and min of a vector.

To create a label with the X value coresponding to YMax use,
for example:

[INDEX (V1)[[AZ:iMax (X26)]]]

M  +0    -1    src/datasources/ascii/asciisource.cpp
M  +19   -0    src/libkst/vector.cpp
M  +1    -0    src/libkst/vector.h

http://commits.kde.org/kst-plot/a319703a76e27b30b3b6c122c708583132421939