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

Home » Public Forums » archive » Re: Overplot behalfs strange
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: Overplot behalfs strange [message #73409 is a reply to message #73262] Thu, 04 November 2010 06:38 Go to previous message
sirvival is currently offline  sirvival
Messages: 18
Registered: August 2010
Junior Member
On 4 Nov., 14:04, David Fanning <n...@dfanning.com> wrote:
> Yes, any time you do a Plot or Contour command,
> a data coordinate system is established and stored
> in system variables. It doesn't matter what window
> you issue the command in.

Ah ok. If it gets stored as system variable then the behavior makes
sense.
The extra pro was only mentioned by me because thats how I noticed the
"problem" (I used an existing pro and reduced its code for my purpose.
The /noerase was missing therefor. When I compared both pros the only
difference I noticed was the /noerase that was done in the original
prior to the main plot).

> When you use the NLEVELS keyword in a contour plot,
> you are only guaranteed the number of levels won't
> exceed N. How many *less* than N you get is a matter
> of which phase the moon is in and whether you have
> attended religious services in the past 10 days.

Final code (with correct nlevels as shown in your example):

levels = 15
step = (Max(ordim[sx:ex,sy+5:ey-5]) - Min(ordim[sx:ex,sy+5:ey-5])) /
levels
userLevels = IndGen(levels) * step + Min(ordim[sx:ex,sy+5:ey-5])
y = indgen((ey-5)-(sy+5)+1)+(sy+5)
window,5,xsize=1280,ysize=1000
loadct,0
contour,ordim[sx:ex,sy+5:ey-5],x,y,nlevels=15,thick=2.5,col= 2,
xstyle=5, ystyle=5, /nodata
display,ordim[sx:ex,sy+5:ey-5],x,y,/log,xtitle='Pixel',ytitl e='Pixel'
colors
contour,ordim[sx:ex,sy
+5:ey-5],x,y,xtitle='Pixel',ytitle='Pixel',levels=userLevels ,thick=2.5,col=2,/
overplot
write_jpeg,'contour.jpg',tvrd(true=1),true=1,quality=100


Thx again
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: paging question
Next Topic: N-body integrator

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

Current Time: Sat Oct 11 20:15:17 PDT 2025

Total time taken to generate the page: 0.96189 seconds