Re: Contour command [message #64969] |
Sun, 01 February 2009 20:54 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
xiao writes:
> Hi~ everyone, i have a question about CONTOUR command.
> I have an array which is 365*180. The max value of the array is about
> and the min is 0.
> But when i plot it using CONTOUR. it gave me very weird plot. it
> seems that IDL plot the array for multiple times.
> Is there anything wrong with my program here?
>
> Thank you very much
>
>
> day=indgen(365)+1
> lat=indgen(180)-90
> flux=fltarr(365,180)
>
> for i=0,364 do begin
> for j=0,179 do begin
>
> insol,day(i),lat(j),tinsol,sigma
> flux(i,j) = tinsol
>
> endfor
> endfor
>
> help,flux
> contour,flux,day,lat
> end
Do you mean, besides the usual things people always do wrong? :-)
http://www.dfanning.com/documents/tips.html#CONTOURPLOTTIPS
I'd especially read the tip about not allowing IDL to choose
contour intervals for you.
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.")
|
|
|