Units and unit prefixes for setvars
Okapi
Ex.
•make/o/n = 1 Current
•SetScale d 0,0,"A", Current
•Current = 0.001
•display Current
Note the Y-axis label automatically has the unit "A" and the prefix "m".
SetVars can be tied to a single element of a wave but AFAIK the unit and the unit prefix can't automatically be displayed along with the value.
It would be helpful if Igor displayed the units and unit prefixes of setVars tied to wave elements automatically. Failing that, is there code that could be added to the setvar procedure that could update the setVar title to display the unit and unit prefix? In particular, is it possible to take advantage of whatever Igor is using to determine the unit prefix for graph axis labels?
Thank you for your help.
But if the SetVariable is read only (non-editable), I think it might be ok to use %W in the format string.
Alternately, you could use a ValDisplay control with %W in the format string.
See the help for printf for information on what the %W token does.
July 3, 2016 at 11:50 am - Permalink