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

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


AHELP for CIAO 4.9 ChIPS v1

reposition_plot

Context: plots

Synopsis

Repositions the plot within the frame.

Syntax

reposition_plot(x1, y1, x2, y2)
reposition_plot(id, x1, y1, x2, y2)

Description

The function arguments.

Argument Description
x1, y1, x2, y2 The lower left (x1,y1) and upper right (x2,y2) corners of the plot in frame normalized coordinates.
id A ChipsId structure identifying the item.

The reposition_plot command is used to modify the location of the plot within the frame. The location is specifed as lower left (x1,y2) and upper right (x2,y2) values. The values are in Frame Normalized Coordinates with (0,0,1,1) representing the entire frame.

Repositioning the plot changes the margins. They become:

  • left margin = x1
  • bottom margin = y1
  • right margin = 1-x2
  • top margin = 1-y2

Repositioning the plot may cause the aspect ratio to change. Objects in the plot are adjusted accordingly.

If reposition_plot is called on a plot which was hidden by a grid_objects or split command, the plot will be moved to the specified location and will be made visible.

This is different than the move_plot command, which cannot change the aspect ratio of the plot. Refer to the move_plot command for more information.

Example 1

chips> add_plot()
chips> reposition_plot(0.2, 0.3, 0.7, 0.8)

Add a plot using the default plot margins. Reposition the plot to the area between (0.2, 0.3) and (0.7, 0.8).

Example 2

chips> add_plot('id=original')
chips> add_curve('sinwave.dat')
chips> grid_objects(2, 2, 0.05, 0.25, 2)
chips> current_plot('original')
chips> reposition_plot(0.25, 0.42, 0.80, 0.62)

Create a plot and add a curve to it. Use the grid_objects command to create a grid of four new plots, hiding the existing plot. Set the original plot to current and move it to the center of the gridded plots.

Bugs

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

See Also

limits
get_plot_range
plots
add_plot, adjust_grid_gaps, adjust_grid_xrelsize, adjust_grid_xrelsizes, adjust_grid_yrelsize, adjust_grid_yrelsizes, clear_plot, current_plot, delete_plot, display_plot, get_plot, grid_objects, hide_plot, move_plot, set_data_aspect_ratio, set_plot, set_plot_aspect_ratio, split, strip_chart, swap_object_positions

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

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