
Chapter II-12 — Graphs
II-241
The Axis pop-up menu entries L=VertCrossing and B=HorizCrossing you saw in the New Graph dialog
above are actually free axes that are each preset to cross at the numerical zero location of the other. They are
also set to suppress the tick mark and label at zero. For example, given this data:
Make ywave; SetScale/I x,-1,1,ywave; ywave= x^3
Then, using the New Graph dialog, we select ywave from the Y list and then L=VertCrossing from the Y
axis pop-up menu. This generates the following command and the resulting graph:
Display/L=VertCrossing/B=HorizCrossing ywave
If desired, you could remove the tick mark and label at -0.5. To do this you would double-click the axis to reach
the Modify Axis dialog, choose the Tick Options tab, and finally type -0.5 in one of the unused Inhibit Ticks boxes.
The free axis types described above all require that there be at least one trace that uses the free axis. For
special purposes Igor programmers can also create a free axis that does not rely on any traces by using the
NewFreeAxis operation (page V-447). Such an axis will not use any scaling or units information from any
associated waves if they exist. You can specify the properties of a free axis using the SetAxis operation
(page V-565) or the ModifyFreeAxis operation (page V-408), and you can remove them using the KillFree-
Axis operation (page V-330).
Appending Traces
You can append waves to a graph as a waveform or XY plot by choosing Append Traces to Graph from the
Graph menu. This presents a dialog identical to the New Graph dialog except that the title and style macro
items are not present. Like the New Graph dialog, this dialog provides a way to create new axes and pairs
of XY data. The Append to Graph submenu in the Graph menu provides the means to append category
plots, contour plots and image plots.
Igor’s curve fitting routines will append traces to your graph automatically if you request it (see Auto-Trace
on page III-178 for details).
Trace Names
The operations ModifyGraph (traces), RemoveFromGraph, ReorderTraces, ErrorBars and Tag take trace
names as parameters.
A trace displays data from a wave but a trace name is not necessarily the same as a wave name. For example:
Make wave0 = sin(x/8)
// Create first instance of wave0. Trace name is wave0 (equivalent to wave0#0).
Display wave0
// Create second instance of wave0. Trace name is wave0#1.
AppendToGraph wave0
-1.0
-0.5
0.5
1.0
-1.0 -0.5
0.5 1.0
Komentáře k této Příručce