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

Home » Public Forums » archive » Problem with PLOT_OO ticks
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: problem with plot [message #56683 is a reply to message #3674] Mon, 12 November 2007 07:11 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
nakisa writes:

> I am new in IDL , I want to plot data which restored in txt file and
> plot by below code.
>
>
> pro test
> A_x=fltarr(1)
> A_y=fltarr(1)
> fn='F:\test.txt'
> openr,1,fn
> repeat begin
> readf,1,x,y
> ;A_x(*)=x
> ;A_y(*)=y
> plot,A_x,A_y
> endrep until eof(1)
> close,1
> ;plot ,A_x,A_y,PSYM=4,Title="test"
> END
>
>
> It runs ,but plot only a frame!! Can anybody say me where the error
> is

Oh, dear. How about something like this:

PRO test
datafile = 'F:\test.txt'
rows = File_Lines(datafile)
data = FltArr(2,rows)
OpenR, lun, datafile, /Get_LUN
ReadF, lun, data
Free_Lun, lun
x = Reform(data[0,*])
y = Reform(data[1,*])
Plot, x, y
END

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: linfit and regress questions
Next Topic: Re: Using .evf files programmatically

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

Current Time: Sun Oct 12 02:04:58 PDT 2025

Total time taken to generate the page: 0.88610 seconds