Change the location of the center of the plot.
panto(x, y) panto(id, x, y)
The function arguments.
|x, y||The coordinates of the new plot center, in the currently selected coordinate system.|
|id||A ChipsId structure identifying the item.|
The panto command changes the plot so that it is centered on the supplied coordinates.
The pick_limits(), limits(), and zoom() commands can also be used to change the limits of the plot, and they can also be changed directly using the ChIPS GUI.
chips> x = np.arange(0,10,0.1) chips> y = np.tan(x) chips> add_curve(x, y, ["symbol.style", "none"]) chips> limits(0, 10, -40, 90) chips> get_plot_range() [0.0, 10.0, -40.0, 90.0] chips> panto(6, 0) [1.0, 11.0, -65.0, 65.0]
Here we create a plot, set the limits and then use the panto command to change the center of the plot. The final plot still has a data range of 10 (x) and 130 (y).
chips> clear() chips> add_image("img.fits", ["colorbar", "heat"]) chips> panto(230.0414, -42.4876) chips> zoom(2)
Here we display an image, change it so that it is centered on a new location and then zoom into the plot.
chips> pv = get_pick() chips> panto(pv, pv)
Here we select a point on the plot using the mouse and then use panto() to change the plot to center on this location.
chips> id = ChipsId() chips> id.plot = "plot1" chips> panto(id, 100.324, 84.56)
Here we change the center of the plot called "plot1". This is similar to
chips> current_plot("plot1") chips> panto(100.324, 84.56)
except that the latter requires a call of "undo(2)" to revert.
See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.
- limits, pick_limits, zoom