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

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


AHELP for CIAO 4.9 ChIPS v1

adjust_grid_yrelsizes

Context: plots

Synopsis

Specify the height of all rows of plots created by split or grid_objects.

Syntax

adjust_grid_yrelsizes(heights)
adjust_grid_yrelsizes(id, heights)

Description

The function arguments.

Argument Description
heights An array containing the relative heights of each row, starting at the top.
id A ChipsId structure identifying the item.

The adjust_grid_yrelsizes command changes the size of all rows of plots in a frame created by split or grid_objects, using the values supplied in the heights parameter. The relational heights of all rows must be specified. For each row i, the height is calculated as

heights[i] * unit_height

where

available_area = 1 - (top_margin + bottom_margin + (num_rows-1)*ygapsize)

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

unit_height = available_area / arraysum

Since the rows are adjusted based on ratios of the heights, the scale of the values is not important. The arrays "[3,6,12]", "[.1,.2,.4]", and "[500,100,200]" all produce the same row height: the rows double in size as they move from top to bottom.

To change the spacing between the plots, use the adjust_grid_gaps command.

Example 1

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

A split command is issued to create a grid of 9 plots. The adjust_grid_yrelsizes command sets the height of the second and third rows of plots to be double the height of the first row.

Example 2

chips> adjust_grid_yrelsizes([1,1])

Set the heights of two rows of plots to be equal.

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, 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:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.