Re: how to draw (x,y.z) point without binning x and y ?

From: X. Lu, Peking Univ. <hsienkuo.lu_at_gmail.com>
Date: Tue, 12 Jun 2007 18:39:06 +0800


Thanks ! It works.

And one more question:
I am using the option "Pcol". But how can I define the color myself?

For example, the z value ranges from -2 to 2, then I would like to have the 4 regions
-2 ~ -1, -1 ~ 0, 0 ~ 1, 1 ~ 2
represented by 4 colors.
How can I do this?

Thanks again !

Best Regards,
Xianguo

On 6/11/07, Olivier Couet <Olivier.Couet_at_cern.ch> wrote:
>
> TGraph2D with option P or P0 is the answer. See TGraph2D help.
>
> -----Original Message-----
> From: owner-roottalk_at_pcroot.cern.ch
> [mailto:owner-roottalk_at_pcroot.cern.ch] On Behalf Of William Robbins
> Sent: Monday, June 11, 2007 5:23 PM
> To: X. Lu, Peking Univ.
> Cc: roottalk
> Subject: Re: [ROOT] how to draw (x,y.z) point without binning x and y ?
>
> Hi-
> I'm having a similar problem. I know that TMarkers can be used for a
> plot of non-binned datapoints in a 2D-plane --maybe this somehow helps
> Xianguo-- but how can we extend to three dimensions?
> cheers
> -Billy Robbins
>
> On Jun 11, 2007, at 9:05 AM, X. Lu, Peking Univ. wrote:
>
> > Dear rooters,
> >
> > I want to draw a graph for a group of 3-D data (x,y,z) in which the x
> > and y values are not binned, i.e. the point in x-y plane is exactly a
> > point. And moreover, the z are binned with 5 bins and in each bin
> > the point is displayed by a specific color.
> >
> > How can I do that ?
> >
> >
> > I can only think of TH2F and use SetBinContent. But the effect is not
> > so satisfactory.
> >
> > Thanks in advance !
> >
> > Best Regards,
> > Xianguo
> >
> >
> > --
> > Take flight into the sky, beyond the moon, beyond my mind.
> >
> > Xianguo LU
> > Physics Department, Peking University
> > Beijing, China
> > Tel: 0086-10-62753888(o)
>
>

-- 
Take flight into the sky, beyond the moon, beyond my mind.

Xianguo LU
Physics Department, Peking University
Beijing, China
Tel: 0086-10-62753888(o)
Received on Tue Jun 12 2007 - 12:39:13 CEST

This archive was generated by hypermail 2.2.0 : Tue Jun 12 2007 - 17:50:01 CEST