WXP
Resource Reference

# Resource: geometry

Resource geometry
Overview Specifies the window and paper geometry.
Command Line -ge=widthxheight[+x+y]
Environment Variable wxpgeom
Possible Values
Default Value 640x512 (for windowed plots)

This resource is used to specify the geometry of the plot. This varies depending on the output device type.

### Display (device d)

For the display device, a new window is opened on the screen surface. The geometry is used to size the window and specify its location on the screen. The size is specified as a width and height in pixels. The location is based on distance in pixels from the upper left corner of the display surface. In the X and Y values are negative, then the distance is measured from the lower right corner of the display.

`   widthxheight[+x+y]`

### Window/Pixmap (device w)

For the window device, the window to be drawn to is already open. Its size and information are passed through the device resource. The geometry now specifies the location of the plot inside the window. By specifying a subset of the overall window size, multipanel plots can be generated. There are two methods for specifying geometry:

1. Absolute coordinates - `widthxheight[+x+y]`
These coordinates repesent the absolute location of the plot inside the window in pixel coordinates.
2. Panel coordinates - p`nxxny[+x+y]`
These coordinates represent the relative panel coordinates. The nx and ny represent the number of plots in each direction. The x and y are the offsets measured from the upper left. For example, to produce a 4 panel plot (2x2) and the current plot is the lower left, the geometry would be:
`   -ge=p2x2+0+1`
3. Fractional panel coordinates - p`dxxdy[+x+y]`
These coordinates represent the fractional panel coordinates. The dx and dy represent the fraction of the overall window ( 0 < dx < 1)   the panel will use. The x and y are the offsets measured from the lower left. For example, to produce a 4 panel plot (2x2) and the current plot is the upper left, the geometry would be:
`   -ge=p.5x.5+0+.5`

### Postscript (device p)

For the postscript device, the geometry represents the size and location of the plot on the page. The units are in .01" (hundredths of an inch). The offset is from the lower left corner of the page (standard Poscript coordinates) For example, if the plot is 4.5"x3.5" in size and offset 1" in each direction, the geometry would be:

`   -ge=450x350+100+100`

The maximum size of an 8.5x11" page is 1050x800. The page is by default in landscape unless it is changed with the device resource. The default page size can be set in the device resource or with the wxpps_param environment variable.  Panel and Fractional coordinates can also be used.

### HPGL (device h)

For HPGL plotting devices, the geometry is the same as for Postscript. The geometry represents the size and location of the plot on the page. The units are in .01" (hundredths of an inch). The offset is from the lower left corner of the page.  For example, if the plot is 4.5"x3.5" in size and offset 1" in each direction, the geometry would be:

`   -ge=450x350+100+100`

The maximum size of an 8.5x11" page may be 1050x800. Plotters have smaller page sizes. The page is by default in landscape unless it is changed with the device resource. The default page size can be set in the device resource or with the wxphp_param environment variable.  Panel and Fractional coordinates can also be used.

Last updated July 30, 1998