|
Getting Started with IDL: 2-D Plots |
|
The iPlot tool's primary design is to display plot data, though the tool is capable of much more once the data is plotted. The iPlot tool can display multiple types of plots and allows you to manipulate and edit the displays.
The first task is to display plot data. Here is a simple example of how to display a plot.
At the IDL command line, enter:
iPlot, RANDOMU(seed, 20)
Once you have plotted data, you may overplot new plot data in the original iPlot window. Overplotting is the process of plotting new data over the top of original data or datasets for the purpose of analyzing or comparing more than one dataset at a time.
For example, in order to overplot cosine data onto a plot of sine wave data follow these steps:
theory = SIN(2.0*FINDGEN(200)*!PI/25.0)*EXP(-0.02*FINDGEN(200))
iPlot, theory
newtheory = COS(2.0*FINDGEN(200)*!PI/25.0)*EXP(-0.02*FINDGEN(200))
iPlot, newtheory, /OVERPLOT
| Note You can also overplot in the iPlot tool any other way you can load new data into the existing iPlot tool (for example, using File Open). |
The iPlot tool allows you many options for modifying and manipulating your plots, such as displaying 3D plots, displaying polar plots, adding error bars, legends, colorbars, curve fitting, filtering, and annotating among other things. For much more information on working with the iPlot tool, see Working with Plots.
IDL Online Help (March 06, 2007)