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

Home » Public Forums » archive » Re: Contour Issues... Help please
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: Contour Issues... Help please [message #62503] Thu, 11 September 2008 11:20
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
plim.dreaming@gmail.com writes:

> It has been a while since I last posted here, for me that's a good
> sign.
>
> Contour plots have always been full of issues. Contour plots and
> "histogram"... It's like the user wants to do one thing and the
> program wants to do another...
>
> I have a set of irregularly distributed sources. 2 dimensional space.
> x, y.
> I would like to plot a contour of their density distribution. So I
> figured, i'll use hist_2d to grid the space into bins of 0.1 by 0.1
> and then contour plot the result.
>
> result =
> hist_2d(hmk,jmh,bin1=0.1,bin2=0.1,max1=max(hmk),max2=max(jmh ),
> min1=min(hmk), min2=min(jmh))
>
> levels = 30
> step=(max(result)-min(result))/levels
> userlevels=indgen(levels)*step + min(result)
> contour,result,levels=userlevels,background=1,color=black,xs tyle=1,ystyle=1
>
> Right?! Anybody see any major error thus far?
> The thing is that the contour plot comes out with its axis ranging
> from 0 to 50 whereas the input data only ranges from -1 to 4. And I
> can't figure out why.

Well, because when you don't pass the 2nd and 3rd positional
parameters to Contour to give it some information on how you
would like your axes laid out, it just uses the number of
elements in the 1st parameter to label the axes.

Cheers,

David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Previous Topic: write_tiff integer format
Next Topic: Re: simple vectorizing problem

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

Current Time: Thu Oct 09 22:43:37 PDT 2025

Total time taken to generate the page: 0.96187 seconds