Skip to main content

AxisInfo

AxisInfo (graphNameStr, axisNameStr)

The AxisInfo function returns a string containing a semicolon-separated list of information about the named axis in the named graph window or subwindow.

Parameters

graphNameStr can be "" to refer to the top graph window.

When identifying a subwindow with graphNameStr, see Subwindow Syntax for details on forming the window hierarchy.

axisNameStr is the name of the axis.

Details

The string contains groups of information. Each group is prefaced by a keyword and colon, and terminated with a semicolon. The keywords are:

KeywordInformation Following Keyword
AXFLAGFlag used to select the axis in any of the operations that display waves (Display, AppendMatrixContour, AppendImage, etc.).
AXTYPEAxis type, such as "left", "right", "top", or "bottom".
CATWAVEThe wave supplying the categories for the axis if this is a category plot.
CATWAVEDFFull path to data folder containing category wave.
CTRACEName of the trace controlling the named axis. See Trace Names for background information. This field was added in Igor Pro 9.00.
CWAVEName of wave controlling named axis.
CWAVEDFFull path to data folder containing controlling wave.
FONTActual name of font used to draw axis tick labels.
FONTSIZEActual size of font used to draw axis tick labels, in points.
FONTSTYLEActual font style used to draw axis tick labels, in points. See ModifyGraph for Axes fstyle for the meaning of this integer value.
HOOKName set by ModifyFreeAxis with hook keyword.
ISCATTruth that this is a category axis (used in a category plot).
ISTFREETruth that this is truly free axis (created via NewFreeAxis).
MASTERAXISName set by ModifyFreeAxis with master keyword.
RECREATIONList of keyword commands as used by ModifyGraph command. The format of these keyword commands is:
keyword (x)=modifyParameters;
SETAXISCMDFull SetAxis command.
SETAXISFLAGSFlags that would be used with the SetAxis function to set the particular auto-scaling behavior that the axis uses. If the axis uses a manual axis range, SETAXISFLAGS is blank.
UNITSAxis units, if any.

The format of the RECREATION information is designed so that you can extract a keyword command from the keyword up to the ";", prepend "ModifyGraph ", replace the "x" with the name of an actual axis and then Execute the resultant string as a command.

Examples

Make/O data=x;Display data
Print StringByKey("CWAVE", AxisInfo("","left")) // Prints data
// Get a numeric value from the RECREATION keyword nested keyword values
String info = AxisInfo("","left")
String key = ";RECREATION:"
Variable index = strsearch(info,key,0)
String recreation = info[index+strlen(key),inf]
Print recreation // prints catGap(x)=0.1;barGap(x)=0.1;...
Print NumberByKey("barGap(x)",recreation,"=") // Prints 0.1

See Also

GetAxis, SetAxis, AxisLabel, StringByKey, NumberByKey

The "Readback ModifyStr.ipf" WaveMetrics procedure file is useful for parsing strings returned by AxisInfo.