Get the upper and/or lower x-axis limits of the plot
Integer_Type chips_get_xrange()
Determines the limits of the plot's x-axis. On
success, two float values will be returned. Two NULLs
are returned on error (e.g. if there is no drawing area).
Note that the limits returned are those used internally by
ChIPS to draw the plot axes, so they may not
match the numeric limits of the plotted data.
To return either the minimum or the maximum value, the syntax
(xmin,) = chips_get_xrange()
(,xmax) = chips_get_xrange()
can be used.
The limits may be adjusted with chips_set_xrange.
chips> input=readfile("/data/chips/phas.fits")
chips> curve x input.x y input.y
chips> (xmin,xmax) = chips_get_xrange()
chips> vmessage("xmin = %f, xmax = %f",xmin,xmax)
xmin = 751.849976, xmax = 887.150024
A data file is read in and plotted, then the minimum and
maximum values of the x-axis are printed out.
chips> spec=readfile("/data/threads/Chips/data1.pha")
chips> curve x spec.channels y spec.counts
chips> (,rmax) = chips_get_xrange()
chips> print(rmax)
72.45
Here only the upper (maximum) x-axis limit was desired.
- chips
-
chips_auto_redraw,
chips_clear,
chips_color_name,
chips_color_value,
chips_get_pane,
chips_get_xscale,
chips_get_yrange,
chips_get_yscale,
chips_get_zrange,
chips_get_zscale,
chips_label,
chips_line,
chips_pickpoints,
chips_redraw,
chips_set_pane,
chips_set_xrange,
chips_set_xscale,
chips_set_yrange,
chips_set_yscale,
chips_set_zrange,
chips_set_zscale,
chips_split,
chips_version
|