About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2007

URL: http://cxc.harvard.edu/chips4.0/split.sl.html
AHELP for ChIPS 4.0 split Context: sl.chips

Synopsis

Creates a grid of plot areas

Syntax

split([id,] [rows,] [cols,] [ygap,] [xgap]);

Description

  • id - an optional ChipsId structure containing values to modify the currency state for the command or a string id to modify the specified window.
  • rows - number of rows (default is 2)
  • cols - number of columns (default is 1)
  • ygap - spacing between the rows
  • xgap - spacing between the columns

The split command creates a grid of "rows" x "cols" plot areas. The plot areas are numbered sequentially from the upper left corner, left to right and top to bottom.

If no argument is given, a 2 x 1 grid is created. If only the number of rows is specified, an N x 1 grid is created.

The xgap and ygap values are given as a percentage of the plot area, as defined by the plot margins in the preferences file.

Currency and the split command

The currency rules still apply when using the split command. This may be confusing when issuing multiple split commands or deleting a plot area after a split command. For instance:

chips> split(3,2);

chips> info_current;
Window [win1]
  Frame [frm1]
    Plot [plot1]
    Coord Sys [Plot Normalized]


chips> delete_plot("plot3");

chips> info_current;
Window [win1]
  Frame [frm1]
    Plot [plot6]
    Coord Sys [Plot Normalized]

The first plot area (plot1) is current after the split command. After deleting one of the plot areas, plot6 is current. This follows the currency rule that when an object is deleted, the last object of that type that was created becomes current (not the one that was most recently current).

Use the info_current command ("ahelp sl.chips info_current") to find out which plot area is current at any point in the session.

Customizing the Grid

To modify the gap spacing after the grid has been created, use the adjust_grid_gaps, adjust_grid_xgap, and adjust_grid_xgap commands ("ahelp sl.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.

The strip_chart command has functionality similar to split; see "ahelp sl.chips strip_chart" for information on how to create a strip chart containing multiple plots.

Example 1

chips> split;

Create a grid with two plots, one above the other.

Example 2

chips> split("win1", 4, 1, 0.05);

Create 4 plots arranged vertically in the window with id "win1". Set the vertical gap between each plot to 0.05.

Example 3

chips> split(3, 2, 0, 0.05);

Create a grid with three rows and 2 columns. There is a horizontal gap between the two columns but no gap between the rows.

Bugs

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

Last modified: December 2007



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.