Get the upper and/or lower y-axis limits of the plot
Integer_Type chips_get_yrange()
Determines the limits of the plot's y-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
(ymin,) = chips_get_yrange()
(,ymax) = chips_get_yrange()
can be used.
The limits may be adjusted with chips_set_yrange.
chips> input=readfile("/data/chips/phas.fits")
chips> curve x input.x y input.y
chips> (ymin,ymax) = chips_get_yrange()
chips> vmessage("ymin = %f, ymax = %f",ymin,ymax)
ymin = -6.300000, ymax = 132.300003
A data file is read in and plotted, then the minimum and
maximum values of the y-axis are printed out.
chips> spec=readfile("/data/threads/Chips/data1.pha")
chips> curve x spec.channels y spec.counts
chips> (,rmax) = chips_get_yrange()
chips> print(rmax)
36.75
Here only the upper (maximum) y-axis limit was desired.
- chips
-
chips_auto_redraw,
chips_clear,
chips_color_name,
chips_color_value,
chips_get_pane,
chips_get_xrange,
chips_get_xscale,
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
|