
Chapter II-12 — Graphs
II-304
Even if preferences are on when a new graph with waves is created or when a wave is newly appended to
an existing graph, the wave is still displayed using the usual default left and bottom axes unless you explic-
itly specify another named axis. The preferred axes are not automatically applied, but they are listed by
name in the New Graph, and the various Append to Graph dialogs, in the two Axis pop-up menus so that
you may select them.
For example, suppose you capture preferences for an XY plot using axes named “myRightAxis” and
“myTopAxis”. These names will appear in the X Axis and Y Axis pop-up menus in the New Graph and
Append Traces to Graph dialogs.
• If you choose them in the New Graph dialog and click Do It, a graph will be created containing newly-
created axes named “myRightAxis” and “myTopAxis” and having the axis settings you captured.
• If you have a graph which already uses axes named “myRightAxis” and “myTopAxis” and choose
these axes in the Append Traces to Graph dialog, the traces will be appended to those axes, as usual,
but no captured axis settings will be applied to these already-existing axes.
Captured axes may also be specified by name on the command line or in a macro or function, provided pref-
erences are on:
Function AppendWithCapturedAxis(wav)
Wave wav
Variable oldPrefState
Preferences 1; oldPrefState = V_Flag // Turn preferences on
Append/L=myCapturedAxis wav // Note: myCapturedAxis must
// be vertical to use /L
Preferences oldPrefState // Restore old prefs setting
End
The Category Plots:Axes and Axis Labels and Category Plots:Wave Styles are analogous to the correspond-
ing settings for XY plots. Since they are separate preference categories, you have can independent prefer-
ences for category plots and for XY plots. Similarly, preferences for image and contour plots are
independent of preferences for other types. See Chapter II-13, Category Plots, Chapter II-14, Contour Plots,
and Chapter II-15, Image Plots.
How to use Graph Preferences
Here is our recommended strategy for using graph preferences:
1. Create a new graph containing a single trace. Use the axes you will normally use.
2. Make the graph appear as you prefer using the Modify Graph dialog, Modify Trace Appearance
dialog, the Modify Axis dialog, etc. Move the graph to where you prefer it be positioned.
3. Choose the Graph→Capture Graph Prefs menu. Select the desired categories, and click Capture Prefs.
4. Bring up the Miscellaneous Settings dialog from the Misc menu, choose Graph Settings, and select
the Repeat Wave Style Prefs in Graphs checkbox.
Saving and Recreating Graphs
When you save an experiment all of its windows, including graphs, are saved as part of the experiment.
When you reopen the experiment all windows will be intact.
If you click in the close button of a graph window, Igor asks
you if you want to save a window recreation macro.
Igor presents the graph’s name as the proposed name for
the macro. You can replace the proposed name with any
valid macro name.
If you want to make a macro to recreate the graph, click Save or press Return or Enter. If you press Option
(Macintosh) or Alt (Windows) you will notice that the No Save button becomes the default allowing you to
press Return or Enter to dismiss the dialog without saving a recreation macro.
Komentáře k této Příručce