next up previous contents
Next: 6.7 Publication Quality Plots Up: 6 PLOTTING YOUR SPECTRA Previous: 6.5 Axes, Titles, and

6.6 Plot Sizes and Positions

The placement and dimensions of plots are controlled by the system variable !P.POSITION, or, for individual plots, the keyword POSITION. These are four-element arrays containing the normalized coordinates of the axis endpoints. There is another four-element system variable (!P.REGION) which sets limits on the entire plotting region (including annotation).



The coordinates are expressed in units of total screen size; i.e.,.0 represents 100% of the screen. For example, to make three plots of unequal size, with the first one taking up most of the left half of the screen, the second in the upper right corner, and the third in the remaining portion of the right side of the screen:

PLOT,W,F,POSITION=[.1,.1,.5,.9] (left half of screen)

PLOT,W,F,POSITION=[.6,.6,.9,.9],/NOERASE (upper right third)

PLOT,W,F,POSITION=[.6,.1,.9,.5],/NOERASE (remainder of right side)

When using !P.POSITION or the corresponding POSITION keyword parameter, remember that you should leave room for annotation.

The usage of !P.REGION differs from !P.POSITION in that there is no keyword parameter that corresponds to it. Also, the appearance of your plots will depend on how you set the X and Y axis margins (described below). The axes will be drawn with margins measured from the coordinates specified by !P.REGION. It is a good idea to decrease the margins if you define a plotting region that is smaller than usual.

Both !P.REGION and !P.POSITION will be ignored if the ``left'' and ``right'' coordinates are the same. The default coordinates for both system variables are [0,0,0,0].

You can specify the margins outside the axes by using the !X.MARGIN and !Y.MARGIN system variables. These are two-elements arrays given in units of character size.



IDL uses !X.MARGIN=[10,3] and !Y.MARGIN=[4,2] as defaults. The IUEDAC, however, uses !X.MARGIN=[15,4] and !Y.MARGIN=[5,10]. To reset to the IDL default values for an individual plot:


Multiple plots of equal size can be arranged on one page by setting the system variable !P.MULTI, which is a vector specifying the number of plots in the horizontal and vertical directions. For example, to make two plots next to each other:





The first element of !P.MULTI is a flag telling IDL how many empty sectors are available on the screen. To clear the screen before plotting, set it equal to zero. The second element is the number of columns of plots to be arranged across the screen; two in our example. The third element is the number of rows of plots to be stacked vertically; in our example, we specified only one plot per column. Note that we divided the !X.MARGIN system variable in half; otherwise IDL would have tried to put too much space around each plot, resulting in tiny plots. We did not reset !Y.MARGIN because we did not change the number of plots per column.

To reset this vector so that only one plot per page is generated, type:


You will probably want to reset the MARGIN system variables back to the IUEDAC defaults at this point.

Note: The !P.POSITION system variable and the POSITION keyword parameter override the settings of !P.REGION, !P.MULTI, !X.MARGIN, !Y.MARGIN, and the XMARGIN and YMARGIN keyword parameters.

next up previous contents
Next: 6.7 Publication Quality Plots Up: 6 PLOTTING YOUR SPECTRA Previous: 6.5 Axes, Titles, and