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

Home » Public Forums » archive » Plot problem
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: plot problem [message #80964 is a reply to message #39989] Fri, 27 July 2012 22:10 Go to previous messageGo to previous message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Friday, July 27, 2012 4:22:34 PM UTC-7, alx wrote:
> Le vendredi 27 juillet 2012 18:22:28 UTC+2, dave poreh a écrit :
>
>>
>
>> Works perfect. Thanks, just i need to pass a text for each graph:
>
>> !null = text(1,1, 'speed=',$\pm$ num2str, /data, font_size=12)
>
>> that stands for *speed= 10+- 0.2* for instance on each graph. Can you help pls.
>
>>
>
>> Cheers,
>
>>
>
>> Dave
>
>
>
> Try:
>
>
>
> IDL> pl = objarr(6)
>
> IDL> for i=0,5 do begin
>
> IDL> pl[i] = plot(/TEST, LAYOUT=[3,2,i+1], CURRENT=(i ne 0))
>
> IDL> !null = text(100, 0.8-0.05*i, 'text', /DATA, TARGET=pl[i])
>
> IDL> endfor
>
>
>
> Alain.

Dear Alx
It is not working for me! here is the code:
pro GPS_text
cd,'C:\Documents and Settings\Dave\Desktop'
pathName="d:\p\"
List = findfile(pathName+"*.dat")
nosFiles=N_ELEMENTS(List)
data = ptrarr(nosFiles)
outfile = STRARR(nosFiles)
p1=objarr(27)
for i = 0, nosFiles - 1 do begin
x=read_ascii(list[i],DATA_START=1)
rootname = File_Basename(list[i], '.dat')
data[i] = ptr_new(x)
vert=(*data[i]).(0)
p1[i]=plot(vert[0,*],vert[1,*],'ob', /SYM_FILLED, $
SYM_SIZE=0.5,MARGIN=[0.1,0.2,0.0,0.05],layout=[3,9,i+1],/CUR RENT)
fit=linfit(vert[0,*],vert[1,*],yfit=yfit)

!null = text(100, 0.8-0.05*i, 'speed=', /DATA, font_size=12, TARGET=p1[i])

p2= plot(vert[0,*],yfit , thick=2,color='red',xrange=[1998,2013],$
/overplot, /SYM_FILLED, /undoc)
print, fit, mean(vert[6,*])

endfor

end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to manipulate vectors by the index
Next Topic: Hardware suggestions for IDL/ENVI.

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

Current Time: Wed Oct 08 20:07:16 PDT 2025

Total time taken to generate the page: 0.00425 seconds