Apply an operation to graph axis labels

Is there a way to apply an operation to the axis  graph labels? For example, instead of having the y values on the y axis, display y-offset (and have ticks at "simple" values).

I'm not sure exactly what you mean by "y-offset". Perhaps you mean that you have some constant y0 and you would like the tick labels to reflect y-y0 rather than y. If that is the case, you can set the offset as a trace property. Bring up the Modify Trace Appearance dialog. Turn on the Offset checkbox, then enter you y0 as the Y value in the disclosed edit boxes.

That gives you the particular case you mention. In general, if you have Y data, but you want the axis to reflect some f(y), you can use the Transform Axis package. To access Transform Axis, select Graph->Packages->Transform Axis. It's a complicated package, and some f's can be quite challenging. See the demo experiment under File->Example Experiments->Graphing Techniques->Transform Axis Demo.

You can also use User Ticks from Waves to have ultimate control over the ticks and tick labels. In fact, Transform Axis does that. Read about it: DisplayHelpTopic "User Ticks from Waves"

In reply to by johnweeks

Thanks a lot for this quick answer. I agree that applying an offset to the trace is one way around, but this is not very convenient when there are many traces in the same plot. I had also looked into the Transform Axis package, but it is much too complicated for such a simple operation. "User Ticks from wave" is probably the best way around, thanks for the suggestion.

For a next version of Igor, it would be nice to have the possibility in the "Auto/Man ticks" tab to set an offset and/or a multiplier, as can be done for individual traces.

In reply to by tony

Actually, you can simply select all the traces in the modify traces dialog to do this*, so there's no point in adding a traces popup like I did above.  It becomes more useful if you want to add offset increments, which is what that code originally did as part of a set of functions for manipulating offsets of many traces. The point is, it may not be so hard to work with trace offsets.

* or from command line: ModifyGraph offset={0,OffsetValue}

Forum

Support

Gallery

Igor Pro 8

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More