Chandra X-Ray Observatory
Skip to the navigation links
Last modified: December 2015

Jump to: Description · Examples · Bugs · See Also

AHELP for CIAO 4.9 ChIPS v1


Context: plots


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


adjust_grid_xrelsizes(id, widths)


The function arguments.

Argument Description
widths An array containing the relative widths of each column, starting at the left.
id A ChipsId structure identifying the item.

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 widths parameter. The relational widths of all columns must be specified. For each column i, the width is calculated as

widths[i] * unit_width


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

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

unit_width = available_area / arraysum

Since the columns are adjusted based on ratios of the widths, 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.

Example 1

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

A split command is issued to create a grid of 9 plots. The adjust_grid_xrelsizes command sets the width of the first and third columns of plots to be double the width of the middle column.

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.


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

See Also

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 2015
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: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.