next up previous contents
Next: 6.6 Plot Sizes and Up: 6 PLOTTING YOUR SPECTRA Previous: 6.4 Changing Plot Symbols

6.5 Axes, Titles, and Annotation

Normally the plot limits are rounded off. You can override this option by setting the IDL system variables !X.STYLE and !Y.STYLE equal to 1. For individual plots, the keywords XSTYLE and YSTYLE may be set equal to 1.

Plots may be easily labelled using the IDL system variables !X.TITLE, !Y.TITLE and !P.TITLE. Alternatively, the keywords XTITLE, YTITLE, and TITLE may be used for individual plots. For example, to produce a titled plot of a spectrum:

!P.FONT=-1
!X.TITLE='Wavelength (A)'
!Y.TITLE='Relative Flux'
!P.TITLE='HD 250550'
PLOT,W,F

or

PLOT,W,F,TITLE='HD 250550',XTITLE='Wavelength (A)', $
YTITLE='Relative Flux',FONT=-1

will result in a plot of flux vs. wavelength with the X axis and Y axis appropriately labelled, and a main title centered above the plot. The FONT keyword will select the vector drawn fonts, resulting in the y-axis label being written parallel to the axis, as opposed to having its letters stacked vertically alongside it.

The IUEDAC has a procedure called TITLES which will set !P.FONT to -1, the X axis title to 'Wavelength (Å)', and the Y axis title to erg cm-2 s-1 Å-1 if called with no parameters. There is an optional parameter that will include an exponent in !Y.TITLE, which is useful if you are scaling your fluxes. For example,

TITLES,12

sets the Y axis title to erg cm-2 s-1 Å-1*1012 as well as setting !P.FONT and the X axis title as described above.

The IDL procedure XYOUTS may be used to place text on a plot starting in a location you specify in data coordinates. The calling sequence is

XYOUTS,X,Y,'STRING'

An example is shown in Table 6.1. More elaborate plot styles, including use of different plot scales on different sides of the plot, are described in the IDL User's Guide.


next up previous contents
Next: 6.6 Plot Sizes and Up: 6 PLOTTING YOUR SPECTRA Previous: 6.4 Changing Plot Symbols

2/9/1998