Last modified: December 2013

URL: https://cxc.cfa.harvard.edu/chips/ahelp/panto.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.11 ChIPS v1

panto

Context: limits

Synopsis

Change the location of the center of the plot.

Syntax

panto(x, y)
panto(id, x, y)

Description

The function arguments.

Argument Description
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.


Examples

Example 1

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).

Example 2

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.

Example 3

chips> pv = get_pick()
chips> panto(pv[0][0], pv[1][0])

Here we select a point on the plot using the mouse and then use panto() to change the plot to center on this location.

Example 4

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.


Bugs

See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.

See Also

contrib
chips_utils
limits
limits, pick_limits, zoom