Re: Red lines

lijowski@cosray2.wustl.edu
12 May 1999 15:08:21 -0000


Rene,

Below is a macro. This lines are very faint and rather pink than red.
It is hard to see them. To see them you would have to zoom in ghostview.
I asked my coworkers for the second opinion and also magnifying lens.

These shadowy lines appear best after inserting eps files into a latex
paper and viewing them with ghostview. I have a 4 page paper and all eps
figure seem to show this strange behaviour. I am not quite sure how well
you can reproduce this problem with the attached macro.

Michal Lijowski

{
// gROOT -> Reset();
gROOT -> SetStyle("Plain");
gStyle -> SetOptStat(0);
gStyle -> SetCanvasBorderMode(0);

TCanvas *cc1 = new TCanvas("cc1", "My Canvas", 600, 300);
gStyle -> SetTitleX(0.22);
gStyle -> SetTitleY(0.97);
gStyle -> SetLabelOffset(0.001, "X");

gPad -> SetBottomMargin(0.15);
gPad -> SetLeftMargin(0.15);
gPad -> SetTicks();
// gPad -> SetLogx();
// gPad -> SetLogy();

// define plot ranges with histogram class

Float_t xxmin = 50.0;
Float_t xxmax = 1000.0;
Float_t yymin = 1.0E-9;
Float_t yymax = 2.0E-6;

TH2F *h2r = new TH2F("h2r", "Axis test", 2, xxmin, xxmax, 2, yymin, yymax);
printf(" NDiv %d\n", h2r -> GetXaxis() -> GetNdivisions());
printf(" NBinsX %d\n", h2r -> GetNbinsX());
// h2r -> GetXaxis() -> SetNdivisions(-101);
printf(" NDiv %d\n", h2r -> GetXaxis() -> GetNdivisions());
Float_t ticksize = h2r -> GetTickLength("X");
printf(" TickLength %f\n", ticksize);
h2r -> SetTickLength(0.01, "X");
h2r -> Draw();
printf(" Label offset %9.3E\n", gStyle -> GetLabelOffset("X"));
cc1 -> Update();
cc1 -> SaveAs("test_axis.eps");
}

> From Rene.Brun@cern.ch Wed May 12 07:57:34 1999
> Delivered-To: lijowski@cosray2.wustl.edu
> Date: Wed, 12 May 1999 08:04:05 +0000
> From: Rene Brun <Rene.Brun@cern.ch>
> MIME-Version: 1.0
> To: lijowski@cosray2.wustl.edu
> CC: roottalk@hpsalo.cern.ch
> Subject: Re: Red lines
> Content-Transfer-Encoding: 7bit
>
> lijowski@cosray2.wustl.edu wrote:
> >
> > Hello,
> >
> > Is it any consistent way to remove a red lines along left and top
> > axis of the histograms in EPS files?
> >
> Hi Michal,
> This problem was reported by Scott Wakely and fixed in version 2.21/08.
> Could you report an example of macro showing this problem?
>
> > Setting gStyle -> SetCanvasBorderMode(0) suggested by Marco van Leeuwen
> > does not work in my version of ROOT 2.21/08.
> >
>
> same as above
>
> Rene Brun
>