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

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


AHELP for CIAO 4.9 ChIPS v1

tile

Context: frames

Synopsis

Arranges frames into a grid.

Syntax

tile(columns, rows)
tile(id, columns, rows)

col_tile(columns)
col_tile(id, columns)

row_tile(rows)
row_tile(id, rows)

Description

The function arguments.

Argument Description
columns The number of columns.
rows The number of rows.
id A ChipsId structure identifying the item.

The tile command displays the frames in an NxM (rows x columns) arrangement. Unlike the split and grid object commands, the tile command does not change the actual frame coordinates; it is a viewing mode.

For col_tile, the number of rows is automatically calculated so that all frames are visible in the given number of rows. For row_tile, the number of columns is automatically calculated so that all frames are visible in the given number of rows.

If fewer frames exist than the tile command specifies (i.e. row x column), the frames are arranged by rows until all existing frames are displayed (row1 col1, row1 col2, ... row1 coln, row2 col1, ..., rown coln). The remaining sections of the grid are empty. If new frames are created, they fill the spaces in the grid.

Aspect Ratio

The "frame.aspect" preference controls whether a frame should maintain its original aspect ratio when tiled. The value for a frame is set when the frame is created and cannot be changed. If the value is enabled, the frame maintains its aspect ratio when the frame is tiled. Otherwise, the frame fills the available area of its cell in the tile grid.

Printing

If print_window is called while the frames are tiled, the output will show the tiled display.

The view_placed_frame and view_single_frame commands are used to exit tile viewing mode.

Example 1

chips> add_frame('bgcolor=red')
chips> add_frame('bgcolor=blue')
chips> add_frame(.1,.3,.9,.6,'bgcolor=lime')
chips> tile(3,1)
chips> tile(2,2)
chips> add_frame(.3,0,.8,1,'bgcolor=yellow')

Create three frames and tile them into a single row of 3 columns. Change the tiling to a 2 x 2 grid. Add a fourth frame, which is displayed in the lower right cell of the grid.

Example 2

chips> add_frame(.5,.1,.9,.5,['bgcolor','cornflower'])
chips> add_frame(.1,.1,.5,.5,['bgcolor','skyblue'])
chips> add_frame(.3,.5,.7,.9,['bgcolor','mediumblue'])
chips> tile(2,1)

Add three frames and use the tile command to view two of the three frames. The third frame becomes hidden.

Example 3

chips> add_frame('bgcolor=red')
chips> add_frame('bgcolor=blue')
chips> add_frame(0.1, 0.3, 0.9, 0.6, 'bgcolor=lime')
chips> row_tile(1)

Create three frames and use the row_tile command to display them in a single row of 3 columns.

Example 4

chips> add_frame(0.5, 0.1, 0.9, 0.5, ['bgcolor','cornflower'])
chips> add_frame(0.1, 0.1, 0.5, 0.5, ['bgcolor','skyblue'])
chips> col_tile(1)
chips> add_frame(0.3, 0.5, 0.7, 0.9, ['bgcolor','mediumblue'])
chips> col_tile(1)

Add two frames and display them in a single column. When a third frame is added, it is hidden until col_tile is issued again. This causes the tile grid to be recalculated to use three rows.

Bugs

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

See Also

frames
add_frame, arrange_frames, blink_frames, current_frame, delete_frame, display_frame, get_frame, hide_frame, move_frame, next_frame, reposition_frame, set_frame, view_placed_frame, view_single_frame
utilities
erase, get_object_count

Last modified: December 2013
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.