| Re: Contour Issues... Help please [message #63020 is a reply to message #62553] |
Thu, 16 October 2008 07:04   |
leon.wars
Messages: 1 Registered: October 2008
|
Junior Member |
|
|
On 15 sep, 20:26, kishore1...@gmail.com wrote:
> On Sep 11, 3:01 pm, plim.dream...@gmail.com wrote:
>
>
>
>> Greetings all!
>> 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.
>
>> Any help is greatly appreciated,
>> Plim
>
> Hi
> In your contour program you missed some params.
> For example
> contour,Z(dim1,dim2),x(dim1),y(dim2),levels=lvls,position=po s1,xrange=[limit1,limit2],thick=3,xsty=1,ysty=1,charsize=0.9 ,/
> follow
>
> just follow above method.
>
> Kishore
Hi !
What do you mean with dim1 and dim2?
I have two vectors both with 9125 elements. After hist_2d, I get
an array of [24,15].
When I'm triying to plot the contours of the array mentioned above
the axis are ranging in different scales. Could you help me?
thanks and have a nice day!
|
|
|
|