Re: COLZ option

From: Otto Schaile <Otto.Schaile_at_Physik.uni-muenchen.de>
Date: Wed, 28 Jun 2006 09:02:03 +0200


Hi Monika,
seems to me you have a 1000x1000 2 dim hist, but you fill only 50 out of 1000 channels, all others are empty. In this case you get this faint picture.
Change your binning to:
TH2F *h_2d = new TH2F("h_2d","", 50, 0, 50, 50, 0, 50);

Cheers
Otto

Monika Sharma wrote:
>
> Hi,
>
> Thanks for explaining it.
> I have put the gif file in the following area :
> http://www.star.bnl.gov/~monika/neg_pos.gif
>
> Is there anyway I can improve it. Colours are quite faded.
>
> Thanks for your help.
>
> Regards
> Monika
>
> Olivier Couet wrote:
>

>> Hi,
>>
>> I think you misunderstood what option COLZ is doing:
>>
>>   //  For each cell (i,j) a box is drawn with a color proportional
>>   //  to the cell content.
>>   //  The color table used is defined in the current style (gStyle).
>>   //  The color palette in TStyle can be modified via 
>> TStyle::SeTPaletteAxis.
>>
>> So, no markers are involved in the COLZ drawing. So the markers 
>> attributes changes have no effect on the COLZ layout.
>>
>> Cheers,   O.Couet
>>
>>
>> On Tue, 27 Jun 2006, Monika Sharma wrote:
>>
>>  
>>
>>> Hi everyone,
>>>
>>> I am trying to draw a 2D scatter plot with "colz" option.
>>> But I am not able to change marker style/marker size.
>>>
>>> By default "colz" option takes marker style (1) which is too
>>> small and different colours are quite faded. How can I change the
>>> style and size? Following what I am trying to do :
>>>
>>> TH2F *h_2d = new TH2F("h_2d","", 1000, 0, 50, 1000, 0, 50);
>>>
>>> TStyle *myStyle = new TStyle("myStyle","my style");
>>> myStyle->SetPalette(1,0);
>>> myStyle->cd();
>>> gStyle->SetOptStat(0);
>>> {
>>> .
>>> .
>>> .
>>> .
>>> h_2d->Fill(,)
>>> .
>>> .
>>> .
>>> }
>>>
>>>
>>>
>>> h_2d->SetMarkerStyle(29);
>>> h_2d->SetMarkerSize(1.2);
>>> h_2d->Draw("colz");
>>>
>>>
>>> Thanks for any help.
>>>
>>> Regards
>>> Monika
>>>
>>>
>>>   
>>
>>
>>  
>>

>
>
-- 
Dr. Otto Schaile            Department f"ur Physik, LMU M"unchen
Phone: +49 89 289 14070     Am Coulombwall 1, D-85748 Garching, Germany
Mobil: +49 160 1553598
FAX:   +49 89 289 14072     EMail: Otto.Schaile_at_Physik.Uni-Muenchen.DE
Received on Wed Jun 28 2006 - 09:22:38 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:59 MET