

The following example shows how to use LAYOUT as a simple grid.

LAYOUT Example Using the CONTOUR Function With OVERPLOT PRECIP = TEMP = DAY = FINDGEN( 12) * 30 + 15 Plot #1: In position #1 on the grid defined by LAYOUT myPlot = PLOT(DAY, PRECIP, 'ro-',$ TITLE= 'Denver Precipitation', $ YTITLE= 'Inches', XTITLE= 'Day of Year', $ LAYOUT=) Plot #2: In position #4 on the grid defined by LAYOUT myPlotToo = PLOT(DAY, TEMP, 'bS:', $ TITLE= 'Denver Temperature', $ XTITLE= 'Day of Year', $ YTITLE= 'Degrees Fahrenheit', /CURRENT, $ LAYOUT=)īoth plots appear in the same window, as defined by LAYOUT. You can copy the entire block and paste it into the IDL command line to run it. The code shown below creates the graphic shown above. The following example shows precipitation and temperature data for Denver, Colorado. Note: For each graphic after the first one, you must use the CURRENT property to direct IDL to place the graphic in the same window. The grid numbering starts in the upper left (1) and goes sequentially by column and then by row. The location of the graphic is determined by the third number. The grid is determined by the number of columns (ncolumns) by the number of rows (nrows).

The LAYOUT property specifies a grid within a graphics window, and determines where the graphic should appear.

IDL provides several ways to display multiple graphics in one window.
