Re: Hatched histograms and tickmarks

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Jun 10 1999 - 17:26:18 MEST


Hi Marco,
In case you draw more than one histogram with fill area colors,
you should call
   gPad->RedrawAxis();
to force axis hidden tick marks to be redrawn.
When drawing one single histogram, this happens automatically.

Rene Brun


mvl@nikhef.nl wrote:
> 
> Dear rooters,
> 
> Here is a (cosmetic) problem  with hatched histograms and tickmarks. I've
> tried several solutions, but none seems to work.
> 
> When you draw a hatched histogram, the tickmarks at the axes become
> invisible at the places where the bars 'hit' the axes. This is of vourse
> one way to do it, but I would prefer that the tickamrks remain visible. So
> I tried the following:
> 
> MyHisto->GetYaxis()->Draw();
> 
> and, less elegant:
> 
> MyHisto->GetYaxis()->DrawAxis(xmin,ymin,xmin,ymax);
> 
> and, even less elegant:
> 
> TAxis TmpAxis = new TAxis();
> MyHisto->GetYaxis()->Copy(TmpAxis);
> TmpAxis()->Draw();
> 
> The last seemed to work, but it seems impossible to use one TmpAxis for
> several axes/histograms, and later on it didn't work at all...
> 
> and:
> 
> MyHisto->DrawCopy();
> MyHisto->Reset();
> MyHisto->Draw("same");
> 
> also doesn't work.
> 
> Can anyone come up with a solution (other than redrawing all the axes in my
> three plots, using TGAxis objects)?
> 
> Regards,
> 
> Marco



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:34 MET