RE: Changing size of the color palette and its scale

From: Olivier Couet <Olivier.Couet_at_cern.ch>
Date: Wed, 14 Feb 2007 15:45:56 +0100


Hi,  

To change the palette you should use gStyle->SetPalette(...). For instance gStyle-->Palette(1) define a rainbow palette.  

If you want to change the "geometry" of the palette, you can do it interactively using the mouse.
Saving the modified pad as a .C file will show you which attributes you can change.  

To access the palette within a macro you should do: h->Draw("surf2z");
gPad->Update()
TPaletteAxis *p=
(TPaletteAxis*)h->GetListOfFunctions()->FindObject("palette");  

Cheers, O.Couet


From: owner-roottalk_at_pcroot.cern.ch
[mailto:owner-roottalk_at_pcroot.cern.ch] On Behalf Of Ann-Cecilie Larsen Sent: Wednesday, February 14, 2007 2:51 PM To: RootTalk
Subject: [ROOT] Changing size of the color palette and its scale

Hi,

I have plotted a 2D matrix with the option h->Draw("SURF2Z");
and wonder how I can change the size of the drawn color palette, and also the numbers showing its scale?

Thanks in advance for your help!

Cheers, Cecilie


Ann-Cecilie Larsen

Oslo Cyclotron Laboratory (http://ocl.uio.no/)

Department of Physics, University of Oslo

P.O.Box 1048 Blindern

N-0316 Oslo, Norway

Phone: +47 22 85 64 63 Fax: +47 22 85 64 22

E-mail: a.c.larsen_at_fys.uio.no


Received on Wed Feb 14 2007 - 15:46:05 CET

This archive was generated by hypermail 2.2.0 : Wed Feb 14 2007 - 17:50:03 CET