SetAxis side effects
thomas_braun
I'd like to know if I can get manually the same axis ticks than by using
SetAxis/N=2/A=2 $axis
.In the following example I can get the same axis ranges, but not the same ticks.
Function DoStuff()
Redimension/N=(3) data
Make/O data = {0, 3000, 0}
Display data
SetAxis/A=2/N=2 left
DoUpdate
GetAxis left
Display data
SetAxis left, V_min, V_max
End
Redimension/N=(3) data
Make/O data = {0, 3000, 0}
Display data
SetAxis/A=2/N=2 left
DoUpdate
GetAxis left
Display data
SetAxis left, V_min, V_max
End
To answer the obvious question why I want to use that. I have a graph showing live acquisition data and want to adapt the axis scaling only every x seconds to prevent a flickering image. To achieve that I set the axis to auto scaling, read the axis range back, and then set the axis range manually. This works except that the number of axis ticks changes unexpectedly.
My data has basically an unknown range so all hardcoded solutions don't work.
HJ
Update: I checked it and this returns (almost) identical strings for both graphs. Once, I used AI to get the nTicks parameter. But here it is "5" in both cases...
January 20, 2016 at 08:47 am - Permalink
I also already checked the window recreation macro and that looks exactly like you expect.
January 20, 2016 at 09:24 am - Permalink
You have two choices: extract the command string and use Execute on the string, or extract the command string, and then parse it to discover the settings of the flags.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
January 20, 2016 at 04:14 pm - Permalink
I ended up calculating my own ranges and ticks (not as nice as by the /A flag I admit).
Unfortunately, the AxisInfo-string does not work, see the update in my previous post.
Would it be possible to include a new group in the AxisInfo-string, e.g., "TICKsetting: canonic(x)=0;...." ?
HJ
January 21, 2016 at 12:52 am - Permalink
SetAxis
or to extract the flags used. My question is how can I manually get same axis ticks whichSetAxis/A=2/N=2
creates.January 21, 2016 at 03:54 am - Permalink
Update: The nticks setting is included in the AxisInfo string, so my guess is that you want manual tick spec.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
January 21, 2016 at 12:46 pm - Permalink
The nTick paramter does not work since it is identical for two axis with the same range but different ticks. Actually, all relevant parameters are identical (I did a diff of the AxisInfo strings).
Btw. thomas_braun and myself are not direct colleagues. Must be a German thing to keep everything consistent ;-)
HJ
January 21, 2016 at 03:48 pm - Permalink
ModifyGraph manTicks = 1
would do.We do get some very exacting bug reports from our German customers!
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
January 22, 2016 at 04:07 pm - Permalink
Nope that will not do for this specific case. If I use "Computed Manual Ticks" on my example graph I get as starting values the standard ticks every 1000, and not the every 500 as
SetAxis/A=2/N=2 left
creates them.January 26, 2016 at 06:38 am - Permalink
There have been times that I have wanted to get the tick interval from an axis (I am the author of Transform Axis package) but right now is a bad time for us to go mucking with new features. We're trying desperately to get Igor 7 released!
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
January 26, 2016 at 04:43 pm - Permalink
There have been times that I have wanted to get the tick interval from an axis (I am the author of Transform Axis package) but right now is a bad time for us to go mucking with new features. We're trying desperately to get Igor 7 released!
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
January 26, 2016 at 04:43 pm - Permalink
January 27, 2016 at 03:32 am - Permalink
Go for IgorPro 7 !
HJ
January 27, 2016 at 08:23 am - Permalink