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

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


AHELP for CIAO 4.5 ChIPS v1

adjust_grid_xrelsizes

Context: plots

Synopsis

Modifies the widths of all columns of plots created by split or grid_objects.

Syntax

adjust_grid_xrelsizes([id,] widtharray)

Description

  • id - an optional ChipsId structure containing values to modify the currency state for the command.
  • widtharray - an array containing the ratios for each column in order (left to right).

The adjust_grid_xrelsizes command the size of all columns of plots in a frame created by split or grid_objects using the values supplied for each column in the "widtharray" parameter. The relational widths of all columns must be specified. For each column i, the width is calculated as "widtharray[i] * unit_width", where

available_area = 1 - (left_margin + right_margin + (num_cols -1)*xgapsize)

arraysum = widtharray[0] + widtharray[1] + ..  + widtharray[n]

unit_width = available_area / arraysum

Since the columns are adjusted based on ratios of the widtharrays, the scale of the values is not important. The arrays "[100,200,400]", "[.1,.2,.4]", and "[5,10,20]" all produce the same column widths: the columns double in size as they move from left to right.

To change the spacing between the plots, use the adjust_grid_gaps command ("ahelp adjust_grid_gaps") .

Example 1

chips> split(3,3)
chips> adjust_grid_xrelsizes([1,2,3])

A split command is issued to create a grid of 9 plots. The adjust_grid_xrelsizes command sets the width of the second and third columns of plots to be douple and triple the width of the first column, respectively.

Example 2

chips> grid_objects(2,2,.05,.05,1)
chips> adjust_grid_xrelsizes([32,68])

A grid_objects command creates a grid of 4 plot areas. The adjust_grid_xrelsizes command set the first column to 32 percent of the frame and the second column to 68 percent of the frame.

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_yrelsize, adjust_grid_yrelsizes, clear_plot, current_plot, delete_plot, display_plot, get_plot, grid_objects, hide_plot, move_plot, reposition_plot, set_data_aspect_ratio, set_plot, set_plot_aspect_ratio, split, strip_chart, swap_object_positions

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.