Bug 339194

Summary: I can't print the value X-Axis related with the max value of Y-Axis, into a label
Product: [Applications] kst Reporter: Agustin <agustinivorra>
Component: view objectsAssignee: kst
Status: RESOLVED FIXED    
Severity: normal CC: nicolas.brisset
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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