Re: read and plot ascii data file [message #38891] |
Wed, 07 April 2004 06:15 |
btt
Messages: 345 Registered: December 2000
|
Senior Member |
|
|
Matthias Demuzere wrote:
> Hi,
>
> I made an ascii template in IDL with several rows and columns. If i print it
> out, is see the program is reading it correctly. No i want to use for
> example one column, ex. temperature, and plot that in a graph. Can anyone
> help me with that problem.
>
> hereby i give a part of my IDL program.
> *************************************************
> ; READ STATION DATA - Marseille Observatoire
> ; ----------------------
>
> ; location: 43�18' ; -5�23'
> ; altidtude: 60m
> ; time interval: 15min
>
>
> fnam0='C:\RSI\IDL54\ESCOMPTE\post\surface\Mars_obs_0620_0627 .txt'
>
> Mars_Obs=READ_ASCII(fnam0, TEMPLATE = Mars_obs_0620_0627TEMPLATE)
>
> fnam1='C:\RSI\IDL54\ESCOMPTE\post\surface\Mars_obs_rad_0620_ 0627.txt'
>
> Mars_Obs_rad=READ_ASCII(fnam1, TEMPLATE = Mars_obs_rad_0620_0627TEMPLATE)
>
> print, Mars_Obs
> print, Mars_Obs_rad
> ************************************************
>
Hello,
You can access the variables in each structure like this...
temp = Mars_Obs.temperature
azimuth = Mars_Obs_rad.azimuth
plot, temp, azimuth, psym = ..., linestyle = ...., title = ...
or more directly like this...
plot, Mars_Obs.temperature, Mars_Obs_rad.azimuth, psym = ...,...
Look in the "Getting Started with IDL" manual (Chapters 3 and 4) for
more information on just the kind of things you want to do.
Ben
|
|
|