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

Home » Public Forums » archive » Re: Why the contour does not show?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Why the contour does not show? [message #63871] Fri, 21 November 2008 12:19 Go to next message
xiao zhang is currently offline  xiao zhang
Messages: 81
Registered: June 2008
Member
On Nov 21, 2:02 pm, David Fanning <n...@dfanning.com> wrote:
> xiao writes:
>> ........Hmmm......seems it will take a lot of time for me to
>> correct.... :)
>
> It depends on how fast you can read. :-)
>
> I'd start here:
>
> http://www.dfanning.com/tips/ps_colorswitch.html
>
> And then, go here:
>
> 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.")

Thanks David. These are useful. And I also found another mistake,
because the X,Y range are out of the display so it does not show the
data. Now, I am trying to put it in a map projection an d fill the
color......
Re: Why the contour does not show? [message #63872 is a reply to message #63871] Fri, 21 November 2008 12:02 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
xiao writes:

> ........Hmmm......seems it will take a lot of time for me to
> correct.... :)

It depends on how fast you can read. :-)

I'd start here:

http://www.dfanning.com/tips/ps_colorswitch.html

And then, go here:

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.")
Re: Why the contour does not show? [message #63873 is a reply to message #63872] Fri, 21 November 2008 11:48 Go to previous messageGo to next message
xiao zhang is currently offline  xiao zhang
Messages: 81
Registered: June 2008
Member
On Nov 21, 1:32 pm, David Fanning <n...@dfanning.com> wrote:
> xiao writes:
>> Hi~ guys. I have a problem here. I have a small program doing a
>> contour plot. But is just show me the background, not the data. I
>> guess there is something wrong with the colors. Can anyone help?
>> Thanks
>
>> lat=fltarr(75)
>> lon=fltarr(75)
>
>> latstep=(34.3842-31.6985)/74.0
>> lonstep=(121.5581-118.3524)/74.0
>
>> for i=0,74 do begin
>>  lat(i)=-31.6985-i*latstep
>>  lon(i)=118.3524+i*lonstep
>> endfor
>
>> print,max(lat),min(lat)
>> print,max(lon),min(lon)
>
>> device,decomposed=0
>> !p.background = 255
>> xs=600
>> ys=600
>> window,xsize=xs,ysize=ys
>
>> contour,inits,color=0,xrange=[min(lon),max(lon)],yrange=[min (lat),max
>> (lat)],xtitle='longtitude',ytitle='latitude',title='Sensible heat
>> flux'
>
> I'm going to guess this is because you are doing this
> in PostScript and you are drawing white on white. There
> are lots of articles to read on my web page about PostScript,
> contour plots, and colors. You are making nearly every mistake. :-)
>
> 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.")

........Hmmm......seems it will take a lot of time for me to
correct.... :)
Re: Why the contour does not show? [message #63874 is a reply to message #63873] Fri, 21 November 2008 11:32 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
xiao writes:

> Hi~ guys. I have a problem here. I have a small program doing a
> contour plot. But is just show me the background, not the data. I
> guess there is something wrong with the colors. Can anyone help?
> Thanks
>
> lat=fltarr(75)
> lon=fltarr(75)
>
> latstep=(34.3842-31.6985)/74.0
> lonstep=(121.5581-118.3524)/74.0
>
> for i=0,74 do begin
> lat(i)=-31.6985-i*latstep
> lon(i)=118.3524+i*lonstep
> endfor
>
> print,max(lat),min(lat)
> print,max(lon),min(lon)
>
> device,decomposed=0
> !p.background = 255
> xs=600
> ys=600
> window,xsize=xs,ysize=ys
>
>
> contour,inits,color=0,xrange=[min(lon),max(lon)],yrange=[min (lat),max
> (lat)],xtitle='longtitude',ytitle='latitude',title='Sensible heat
> flux'

I'm going to guess this is because you are doing this
in PostScript and you are drawing white on white. There
are lots of articles to read on my web page about PostScript,
contour plots, and colors. You are making nearly every mistake. :-)

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.")
Re: Why the contour does not show? [message #63970 is a reply to message #63871] Fri, 21 November 2008 12:31 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
xiao writes:

> Thanks David. These are useful. And I also found another mistake,
> because the X,Y range are out of the display so it does not show the
> data. Now, I am trying to put it in a map projection an d fill the
> color......

Well, more pitfalls (and reading) then:

http://www.dfanning.com/color_tips/fill_colors.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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Adding sparse matrices
Next Topic: moment functions with dimen keyword

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

Current Time: Wed Oct 08 20:01:27 PDT 2025

Total time taken to generate the page: 0.00687 seconds