Chandra X-Ray Observatory (CXC)
Skip to the navigation links
Last modified: December 2012

URL: http://cxc.harvard.edu/chips/zoom.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.5 ChIPS v1

zoom

Context: limits

Synopsis

Zoom into or out of a plot by a fixed amount.

Syntax

zoom(scale)
zooom(cid, scale)

Description

  • scale is the zoom factor to use; values greater than 1 zoom into the plot and less than 1 out of the plot (it must be positive).
  • cid is a ChipsId structure used to determine which plot and axes to use.

The zoom command allows the user to zoom into or out of a plot, either by a fixed amount or by using the mouse to change the zoom level interactively.

Interactive zoom

The interactive zoom() command was removed in CIAO 4.4, but the functionality is still available from the ChIPS GUI interface.

Bringing up the GUI

The GUI can be launched by right clicking on an existing ChIPS window and selecting "Show GUI", or by running the show_gui command from the ChIPS command line.

Related commands

The pick_limits(), limits(), and panto() commands can also be used to change the limits of the plot.

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> zoom(2)
chips> get_plot_range()
[2.5, 7.5, -7.5, 57.5]

Here we create a plot, set the limits and then zoom into it. Using a scale factor of 2 halves the displayed axis range as shown by the output of the get_plot_range call.

Example 2

chips> get_plot_range()
[2.5, 7.5, -7.5, 57.5]
chips> zoom(0.25)
chips> get_plot_range()
[-5.0, 15.0, -105.0, 155.0]

By using a scale factor less than 1 the plot limits have increased, this time by a factor of 4.

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, panto, pick_limits

Last modified: December 2012
CXC logo

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2012. All rights reserved.