comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: reading large multicolumn data file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: reading large multicolumn data file [message #72143 is a reply to message #72136] Thu, 05 August 2010 20:05 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Aug 5, 8:54 pm, bio_amateur <hoangtrongminht...@gmail.com> wrote:
> I have a data file (a few hundreds MB). This is a text file in the
> format X Y1 Y2 Y3 (first column is the common x-axis data, next
> columns are data). I can read the data and plot easily with xmgrace
> using
>
> xmgrace -nxy data.dat
>
> which take a few seconds to plot. Now, I want to use IDL to read this
> file and display using iTool. What I did was
>
>  data = read_ascii(filename)
>  myPlotData = data.(0)
>  rows = (size(myPlotData, /dimension))[0]
>  for ii=1, rows do begin
>        iPlot, myPlotData[0,*], myPlotData[ii,*], /overplot
>  end
>
> This method takes so long. Could someone good at this can point out a
> solution for me.

The iTools, as any use of object graphics, can get heavy in memory
when the number of vertices is large (typically, from several hundred
thousand). This may be alleviated if change your IDL preferences to
use hardware rendering, in case it is not already in hardware. Other
than that, only using direct graphics will solve it, as in

minx=min(myplotdata[0,*],max=maxx)
miny=min(myplotdata[1:*,*],max=maxy)

plot,[minx,maxx],[miny,maxy],/nodata
for ii=1,rows-1 do oplot,myplotdata[0,*],myplotdata[ii,*]
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: quick question to get me started on mapping
Next Topic: concatenate by columns

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 20:09:15 PDT 2025

Total time taken to generate the page: 8.48176 seconds