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 2006

URL: http://cxc.harvard.edu/ciao3.4/pagesize.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 pagesize Context: chips

Synopsis

Sets the page dimensions for hardcopy plots.

Syntax

chips> pagesize <width> <length> <unit>

Description

In this context, "hardcopy" refers to both sending the plot directly to a printer and printing it to a postscript file.

Argument: <width>
Description: width of the hardcopy plot
Options: real numbers
Default: 8.0
Argument: <length>
Description: length of the hardcopy plot
Options:  real numbers
Default: 8.0
Argument: <unit>
Description: unit for <width> and <length>
Options: cm, inch, mm
Default: inch

The postscript drivers work well for plots no bigger than 8x8 inch or portrait plots up to about 8x10 inches. Any other setup causes problems due to inconsistant handling of margins that causes errors in calculating the bounding box. The result is that the output of "print postfile" may be clipped even if the pagesize is set correctly; this is most likely to affect plots oriented as "landscape" layout.

If creating a smaller plot is not an option, try one of these workarounds:

  • edit the bounding box by hand in PS file
  • delete the bounding box definition from the PS file
  • gv has the option to change or ignore the bounding box when viewing a PS file

More information on creating hardcopies is available from "ahelp chips print".

CIAO allows some plot attributes to be changed using the ChIPS state object and resource file. See "ahelp chips" for further details.

Unlike most other ChIPS commands, the "pagesize" command modifies the state object. This means that once the desired size has been set, the command does not need to be reissued. The current page size may also be determined by checking the state object, as shown in the EXAMPLES section.

Example 1

chips> rx = [1:10:0.1]
chips> ry = sin(rx)
chips> curve x rx y ry
chips> pagesize 4.0 4.0      
chips> print postfile half.ps

First, a simple plot is created. The page size is set to 4x4 with the default unit of inches (note that it is not necessary to include the unit if it is unchanged). Finally, a postscript file is created.

Example 2

chips> print(chips)
...
pagewidth        =  4
pagelen          =  4
unit             =  inch
...
chips> pagesize 15 15 cm
chips> print(chips)
...
pagewidth        =  15
pagelen          =  15
unit             =  cm
...

Building on the previous example, the height and width of the plot are modified, with the new dimensions given in cm. This also illustrates that changing the page size on the command line updates the ChIPS state object fields.

Bugs

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

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



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.