Version: 1.7.0 (using KDE 4.4.3) OS: Linux If I set the "maxExp" part of scaleExpression to "[P1/XMax]" the axis is scaled so that the last samples of P1 are visible. However, if P1 gets more data then scaling is not reapplied. Is this intentional or a bug? If it is intentional then I suggest it should be documented. How about something like "The expression is not reevaluated if new data is added." Reproducible: Didn't try
This is because [P1/XMax] gives the maximum x-value (XMax) visible in Plot 1 (P1). So if you specify the To as [P1/XMax] then essentially what you're doing is XMax = XMax, and so XMax will never change. What you probably want to do is use [1/Max] where 1 is a vector. Then everything should work as expected.
I started perl -e 'use Time::HiRes; my $i = 0; for (;;) { printf("%f\n", sin($i/10000)); $i++; Time::HiRes::usleep(100); }' | sid kst -y 1 stdin and set the range expressions as follows: from: [1/Max] - 10000 to: [1/Max] This shows me data from -10000 to 0. So apparently [1/Max] is the maximum value of the vector? Next I tried [1/MaxIndex]. It shows me data from 6000 to 16000 but does not update the scale as new data comes in. Can you confirm the same behavior?
It seems that using "[INDEX/Max] - 10000" and "[INDEX/Max] + 10000" shows the new data and is updated when new data comes in. Maybe there's some bug that prevents MaxIndex from being re-evaluated?
[1/MinIndex] and [1/MaxIndex] give, respectively, the index of the minimum and maximum value of a vector. In the example you give [1/MinIndex] and [1/MaxIndex] become 47109 and 15693, respectively - once sufficient data has been read in. The value that you want to be using is probably [1/NS], where NS stands for number of samples. Hope that helps, Andrew ----- Original Message ----- From: "Timo Lindfors" <timo.lindfors@iki.fi> To: <arwalker@sumusltd.com> Sent: Saturday, June 12, 2010 3:50 AM Subject: [Bug 241400] clarify when scaleExpression is evaluated > https://bugs.kde.org/show_bug.cgi?id=241400 > > > > > > --- Comment #2 from Timo Lindfors <timo lindfors iki fi> 2010-06-12 > 12:50:03 --- > I started > > perl -e 'use Time::HiRes; my $i = 0; for (;;) { printf("%f\n", > sin($i/10000)); > $i++; Time::HiRes::usleep(100); }' | sid kst -y 1 stdin > > and set the range expressions as follows: > > from: [1/Max] - 10000 > to: [1/Max] > > This shows me data from -10000 to 0. So apparently [1/Max] is the maximum > value > of the vector? Next I tried [1/MaxIndex]. It shows me data from 6000 to > 16000 > but does not update the scale as new data comes in. > > Can you confirm the same behavior? > > -- > Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email > ------- You are receiving this mail because: ------- > You are on the CC list for the bug.
Created attachment 48010 [details] document many built-in variables
SVN commit 1138006 by arwalker: CCBUG:241400 add description of scalar values generated from datasource, plots, and vectors M +133 -0 equation-appendix.docbook WebSVN link: http://websvn.kde.org/?view=rev&revision=1138006
Thanks for adding MinPos too, I'd never been able to guess it correctly :-)