|
Getting Started with IDL: 2-D Plots |
|
To demonstrate IDL's capability to read a data set and plot it, we will create and use and ASCII template.
plotTemplate, which will contain your custom ASCII template: plotTemplate = ASCII_TEMPLATE( )
A dialog box appears, prompting you to select a file.
plot.txt file in the examples/data subdirectory of the IDL distribution.
| Note Another way to import ASCII data is to use the Import ASCII File toolbar button on the IDLDE toolbar. To use this feature, simply click the button and select plot.txt from the file selection dialog. |
plot.txt file using the custom template, plotTemplate:
PLOT_ASCII = READ_ASCII(FILEPATH('plot.txt', SUBDIRECTORY= $
['examples', 'data']), TEMPLATE=plotTemplate)
| Note The file is read into a structure variable. For more information on accessing ASCII data, see Reading ASCII Data. |
IDL Online Help (March 06, 2007)