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

Home » Public Forums » archive » Why the contour does not show?
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: Why the contour does not show? [message #63963 is a reply to message #63877] Fri, 21 November 2008 16:04 Go to previous messageGo to previous message
xiao zhang is currently offline  xiao zhang
Messages: 81
Registered: June 2008
Member
On Nov 21, 4:16 pm, David Fanning <n...@dfanning.com> wrote:
> xiao writes:
>> haha. That is fine, David, But another problem arouse, When I plot
>> like this:
>
>> map_set,limit=[-34.3842,min(lon),-31.6985,max(lon)], /noborder,color=0
>> map_grid, color=0,/label
>> map_continents,/countries, /coasts, color=0
>> contour,inits,color=0,xtitle='longtitude',ytitle='latitude', title='Sensible
>> heat flux', /device, /CELL_FILL, /Overplot
>
>> It showed the map, but also, it gave me an error:
>
>> Program caused arithmetic error: Floating underflow
>
>> Is it because my data is larger than the map or something?
>
> Oh, underflows can come from a lot of things. The chances
> are, however, that it is not something to worry over
> excessively:
>
> http://www.dfanning.com/math_tips/underflow.html
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.



Sorry I have to ask again, i tried to scaled my data, and the result
is right, but when I try to plot it, it just show me very few colors
(almost bright color) Is it because of my color table? David? Thank
you. BTW: i did scale it from 0 to 255.



tvlct, r,g,b,/get

r(0:63)=
[255,238,221,204,187,170,153,136,119,102,85,68,51,34,17,0,0, 0,0,$
0,0,0,0,0,7,15,23,31,38,46,54,62,86,110,134,158,182,206,$

230,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,$
255,255,255,255,255,255,255,255,255,255]

g(0:63)=
[255,238,221,204,187,170,153,136,119,102,85,68,51,34,17,0,0, 0,0,$

0,0,0,0,0,28,56,84,112,140,168,196,224,227,231,235,239,243,2 47,$

251,255,249,243,237,232,226,220,214,209,182,156,130,104,78,5 2,$
26,0,0,0,0,0,0,0,0,0]

b(0:63)=
[255,238,221,204,187,170,153,136,119,102,85,68,51,34,17,0,0, 36,$

72,109,145,182,218,255,223,191,159,127,95,63,31,0,0,0,0,0,0, 0,$

0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,63,95,127,159,191,223 ,255]


; calcualte the true color index of each color defined above

cn = r + 256L * ( g + 256L * b)

max = max(inits)
inits = (inits-min)/(max-min)
;print,inits
inits = inits*255
inits=fix(inits) ;Scale

map_set,limit=[-34.3842,min(lon),-31.6985,max(lon)],color=0, /noborder
map_grid, color=0
map_continents,/countries, /coasts, color=0

contour,inits,color=0,title='Sensible heat flux', /device,/
NOERASE,xrange=[0,76],/xstyle,xTICKINTERVAL=73,xTICKNAME=[lo n1(0),lon1
(3)],$
yrange=[0,73],/ystyle,yTICKINTERVAL=73,yTICKNAME=[lat1(3),la t1(0)],
$
C_COLORS=cn,/CELL_FILL

screenimg = tvrd(true=1)
write_jpeg, 'jja.jpg', screenimg, true=1
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
Previous Topic: Re: Returning up the stack after error
Next Topic: Nothing to do with IDL

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

Current Time: Fri Oct 10 07:26:30 PDT 2025

Total time taken to generate the page: 0.16024 seconds