|
|
|
|
SynopsisArranges plots into a grid. Syntaxgrid_objects([id,] cols, rows, xgap, ygap [,usage [,plots]]) Description
The grid_objects command creates a grid of NxM (rows x cols) plot areas. The plot areas are numbered sequentially from the upper left corner, left to right and top to bottom. There are also individual commands for creating a row or a column of plots: row_grid_objects([id,] cols_array, xgap, ygap [,usage [,plots]]) col_grid_objects([id,] rows_array, xgap, ygap [,usage [,plots]]) The cols_array is the number of columns of plots for each row; the number of elements in the array indicates the total number of rows. The rows_array is the number of rows of plots to use for each column; the number of elements in the array indicates the total number of columns. All other parameters are the same as for grid_objects. If more than one frame is current, the gridding is applied to all the current frames. The xgap and ygap values are given as a percentage of the plot area, as defined by the plot margins in the preferences file. Usage OptionsThe usage parameter determines what plots are used in the grid. There are five allowed values:
In all cases, existing plots not included in the grid are hidden, not deleted. The plots may be redisplayed with another grid_objects call that include the plot, or by changing the plot location with reposition_plot ("ahelp py.chips reposition_plot") . Hidden plots may still be modified or deleted. Customizing the GridTo modify the gap spacing after the grid has been created, use the adjust_grid_gaps, adjust_grid_xgap, and adjust_grid_xgap commands ("ahelp py.chips adjust_grid_gaps") . The row widths and column heights can be changed with the following commands, each of which has a help file: adjust_grid_xrelsize, adjust_grid_xrelsizes, adjust_grid_xrelsize, and adjust_grid_xrelsizes. Example 1chips> grid_objects(2,2,0,.1,1) Create a grid of four plots arranged in two rows of two columns with spacing between the rows. Existing plots are used, with new plots added as needed. Example 2chips> grid_objects(1,3,0,0,0,['plot2','plot4','plot1']) Stack three existing plots - plot1, plot2, and plot4 (top to bottom) - in a column. All other existing plots are hidden. Example 3chips> grid_objects(3,3,0.05,0.05,2) Creates a 3 x 3 grid of new plots with uniform horizontal and vertical spacing. Any existing plots become hidden. Example 4
chips> add_plot(.1,.1,.9,.9,'id=plot1')
chips> add_contour('contour.fits')
chips> add_plot(.2,.65,.4,.85,'id=inlay1')
chips> add_curve('curve.fits')
chips> add_plot(.6,.65,.8,.85,'id=inlay2')
chips> add_curve('curve_2.fits')
chips> grid_objects(2,2,0,0,3,['plot1'])Create a contour plot with two inlaid curve plots. The grid_objects command creates a 2x2 grid which includes the inlay plots, but excludes the contour plot (usage is set to "3"). Example 5chips> col_grid_objects([1,2,3,4],0.02,0.02,2) Create four columns with a total of 10 new plots. The number of plots per column (moving from left to right) run sequentially from 1 to 4. Any existing plots become hidden. Example 6chips> col_grid_objects([1,2],0,0,0,['plot2','plot1','plot4']) The col_grid_objects command is called to arrange 3 plots so that a tall single plot occupies the left half of the frame's available plot area, and a stacked pair of plots occupies the right. The plots are ordered with 'plot2' on the left, 'plot1' and 'plot4' fill the second column from top to bottom. All other existing plots are hidden. Example 7chips> col_grid_objects([1,2],0,0,0,['plot2','plot1','plot4']) Arrange three plots so that a tall single plot occupies the left half of the frame and a stacked pair of plots occupies the right. 'plot2' is on the left; 'plot1' and 'plot4' fill the second column from top to bottom. All other existing plots are hidden. Example 8chips> row_grid_objects([1,1,2,1],0.05,0.05,2) Create four rows with a total of 5 new plots; the third row contains two plots. Any existing plots become hidden. Example 9chips> row_grid_objects([1,2],0,0,0,['plot2','plot1','plot4']) Arraneg three plots so that a wide, single plot is stacked above a pair of plots. 'plot2' is on the top; 'plot1' and 'plot4' fill the second row from left to right. All other existing plots are hidden. BugsSee the bugs pages on the ChIPS website for an up-to-date listing of known bugs. |
![]() |
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-2004. All rights reserved. |