X
7049

Formatting examples for plot axis titles

The following code example shows how font styles are applied to text used in the titles of the plot axes. For a more detailed look at the different format codes available in IDL please refer to the IDL Help Table of Contents under the this heading:

IDL Programming > Concepts > Format Codes


; *********************************


pro funky_fonts


; Create sample data representing a sine wave

coolwave = sin(2.0*findgen(200)*!pi/25.0)*exp(-0.02*findgen(200))

; Create the plot where the following IDL formatting codes for

; TrueType fonts are applied:
; !8 - Times Italic font
; !4 - Helvetica Bold
; $\circ$ - creates the degree symbol
; m3D-  magenta,thickness 3, diamond,
plot1 = plot(coolwave, "m3D-", title="Sine Wave", $
            xtitle='Test    !8string!X     for X-axis', $
            ytitle= '!4Degrees!X !8Fahrenheit!X ($\circ$F)')
            
; ...and now set some properties for plot1
plot1.sym_increment =10   ;number of plot vertices between symbols
plot1.sym_color ="dark blue"    ;color for the plot symbol outline
plot1.sym_filled = 1        ;to fill the symbols
plot1.sym_fill_color = 'light gray'   ;color for the filled portion of the symbol
plot1.sym_size = 2.8

END


; *********************************