| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| HI~ everyone~ i use the contour pro to display a 2Darray named s11. And I wrote it like this: CONTOUR,s11,rangle,vangle,xrange=[0,180],yrange=[0,90],ytitle='Viewing zenith angle',xtitle='Relative azimuth angle',/C_LABELS But the xrange and yrange do not work and it only labeled on line in the image , Any one see where the problem is ? Thank you very much~ The whole program is like this if u want to see it: rangle=findgen(180) vangle=findgen(90) y1=rangle*3.1415926*2/360 y2=vangle*3.1415926*2/360 ;plot,y thta1=22.5*3.1415926*2/360 thta2=37.5*3.1415926*2/360 thta3=52.5*3.1415926*2/360 thta4=67.5*3.1415926*2/360 ;print,sin(thta2) r1=fltarr(180,90) r2=fltarr(180,90) r3=fltarr(180,90) r4=fltarr(180,90) x10=sin(thta1)*cos(y1) x20=sin(y1)*cos(y2) y10=sin(thta1)*sin(y1) y20=sin(y1)*sin(y2) x11=sin(thta1)*cos(y1) x21=sin(y1)*cos(y2) y11=sin(thta1)*sin(y1) y21=sin(y1)*sin(y2) x12=sin(thta1)*cos(y1) x22=sin(y1)*cos(y2) y12=sin(thta1)*sin(y1) y22=sin(y1)*sin(y2) x13=sin(thta1)*cos(y1) x23=sin(y1)*cos(y2) y13=sin(thta1)*sin(y1) y23=sin(y1)*sin(y2) for i=0,179 do begin for j=0,89 do begin r1(i,j)=x10(i)*x20(j)+y10(i)*y20(j)+cos(y20(j))*co s(thta1) r2(i,j)=x11(i)*x21(j)+y11(i)*y21(j)+cos(y21(j))*co s(thta2) r3(i,j)=x12(i)*x22(j)+y12(i)*y22(j)+cos(y22(j))*co s(thta3) r4(i,j)=x13(i)*x23(j)+y13(i)*y23(j)+cos(y23(j))*co s(thta4) endfor endfor help,r1 s1=acos(r1)*360/2/3.1415926 s2=acos(r2)*360/2/3.1415926 s3=acos(r3)*360/2/3.1415926 s4=acos(r4)*360/2/3.1415926 ;print,acos(r1)*360/2/3.1415926 s11=180-s1 s22=180-s2 s33=180-s3 s44=180-s4 ;help,x1 ;print,s1 !P.background=255 !P.multi=[0,2,2] CONTOUR,s11,rangle,vangle,xrange=[0,180],yrange=[0,90],ytitle='Viewing zenith angle',xtitle='Relative azimuth angle',/C_LABELS CONTOUR,s22,rangle,vangle,xrange=[0,180],yrange=[0,90],ytitle='Viewing zenith angle',xtitle='Relative azimuth angle',/C_LABELS CONTOUR,s33,rangle,vangle,xrange=[0,180],yrange=[0,90],ytitle='Viewing zenith angle',xtitle='Relative azimuth angle',/C_LABELS CONTOUR,s44,rangle,vangle,xrange=[0,180],yrange=[0,90],ytitle='Viewing zenith angle',xtitle='Relative azimuth angle',/C_LABELS end |
|
#2
| |||
| |||
| On Tue, 26 Aug 2008 16:21:05 -0700 (PDT), xiao <littledddna@gmail.com> wrote: >HI~ everyone~ i use the contour pro to display a 2Darray named s11. >And I wrote it like this: > >CONTOUR,s11,rangle,vangle,xrange=[0,180],yrange=[0,90],ytitle='Viewing >zenith angle',xtitle='Relative azimuth angle',/C_LABELS > >But the xrange and yrange do not work and it only labeled on line in >the image , Any one see where the problem is ? > >Thank you very much~ nlevels=5 CONTOUR,s11,rangle,vangle,xrange=[0,180],yrange=[0,90],xstyle=1,ystyle=1,ytitle='Viewing zenith angle',xtitle='Relative azimuth angle',C_LABELS=replicate(1,nlevels) To know how many levels there are (nlevels), you must set the LEVELS keyword yourself., otherwise make nlevels big enough. |
|
#3
| |||
| |||
| On Aug 27, 3:06 am, Wox <nom...@hotmail.com> wrote: > On Tue, 26 Aug 2008 16:21:05 -0700 (PDT), xiao <littledd...@gmail.com> > wrote: > > >HI~ everyone~ i use the contour pro to display a 2Darray named s11. > >And I wrote it like this: > > >CONTOUR,s11,rangle,vangle,xrange=[0,180],yrange=[0,90],ytitle='Viewing > >zenith angle',xtitle='Relative azimuth angle',/C_LABELS > > >But the xrange and yrange do not work and it only labeled on line in > >the image , Any one see where the problem is ? > > >Thank you very much~ > > nlevels=5 > CONTOUR,s11,rangle,vangle,xrange=[0,180],yrange=[0,90],xstyle=1,ystyle=1,ytitle='Viewing > zenith angle',xtitle='Relative azimuth > angle',C_LABELS=replicate(1,nlevels) > > To know how many levels there are (nlevels), you must set the LEVELS > keyword yourself., otherwise make nlevels big enough. Thanks , it works. but the xrange still does not work...... |
|
#4
| |||
| |||
| On Aug 27, 9:02 am, xiao <littledd...@gmail.com> wrote: > On Aug 27, 3:06 am, Wox <nom...@hotmail.com> wrote: > > > > > On Tue, 26 Aug 2008 16:21:05 -0700 (PDT), xiao <littledd...@gmail.com> > > wrote: > > > >HI~ everyone~ i use the contour pro to display a 2Darray named s11. > > >And I wrote it like this: > > > >CONTOUR,s11,rangle,vangle,xrange=[0,180],yrange=[0,90],ytitle='Viewing > > >zenith angle',xtitle='Relative azimuth angle',/C_LABELS > > > >But the xrange and yrange do not work and it only labeled on line in > > >the image , Any one see where the problem is ? > > > >Thank you very much~ > > > nlevels=5 > > CONTOUR,s11,rangle,vangle,xrange=[0,180],yrange=[0,90],xstyle=1,ystyle=1,ytitle='Viewing > > zenith angle',xtitle='Relative azimuth > > angle',C_LABELS=replicate(1,nlevels) > > > To know how many levels there are (nlevels), you must set the LEVELS > > keyword yourself., otherwise make nlevels big enough. > > Thanks , it works. but the xrange still does not work...... Btw, how can I set the intervals of the contour ? thanx |
|
#5
| |||
| |||
| xiao writes: > Thanks , it works. but the xrange still does not work...... Set the [XY]Style keywords to 1 to force exact axis scaling. This is, IMHO, almost always necessary when using the CONTOUR command. You can find more information about the anemic CONTOUR command here: http://www.dfanning.com/documents/tips.html#Graphics2d 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.") |
|
#6
| |||
| |||
| xiao writes: > Btw, how can I set the intervals of the contour ? http://www.dfanning.com/tips/nlevels.html 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.") |
|
#7
| |||
| |||
| On Aug 27, 9:14 am, David Fanning <n...@dfanning.com> wrote: > xiao writes: > > Btw, how can I set the intervals of the contour ? > > http://www.dfanning.com/tips/nlevels.html > > 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.") Thank you ,David ![]() |
|
#8
| |||
| |||
| On Aug 27, 9:16 am, xiao <littledd...@gmail.com> wrote: > On Aug 27, 9:14 am, David Fanning <n...@dfanning.com> wrote: > > > xiao writes: > > > Btw, how can I set the intervals of the contour ? > > > http://www.dfanning.com/tips/nlevels.html > > > 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.") > > Thank you ,David ![]() Sorry, another question....why i always get red as the back ground color when i use this statement? !P.background=255 i thought it should be white.... ![]() |
|
#9
| |||
| |||
| xiao writes: > Sorry, another question....why i always get red as the back ground > color when i use this statement? > > !P.background=255 i thought it should be white.... ![]() http://www.dfanning.com/color_tips/colorchp3.html 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.") |
|
#10
| |||
| |||
| On Wed, 27 Aug 2008 07:41:23 -0700 (PDT), xiao <littledddna@gmail.com> wrote: >Sorry, another question....why i always get red as the back ground >color when i use this statement? > > !P.background=255 i thought it should be white.... ![]() The quick answer would be: device,decomposed=0 !P.background=255 CONTOUR,s11,rangle,vangle,xrange=[0,180],yrange=[0,90],color=0,xstyle=1,ystyle=1,ytitle='Viewing zenith angle',xtitle='Relative azimuth angle',C_LABELS=replicate(1,10) => note the xstyle,ystyle and color keywords |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.