Re: Postscript / Canvas cosmetics

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon May 17 1999 - 12:29:11 MEST


Ulrich Jost wrote:
> 
> Hello,
> 
> some questions about Postscript / Canvas:
> 
> 1) to make the postscript file different from the screen I try
> to set white background and thicker lines etc. like below, but it is
> ignored. I also try to to make the plot a bit smaller with Range(). This
> works, but then the plot is no longer centraled on the paper. In any case,
> it is situated on the bottom of the page and not on the top which I'd
> prefer.
>           TPostScript ps("bla.ps", 111);
>           ps.SetLineWidth(3);
>           ps.SetMarkerSize(2);
>           ps.SetFillColor(9);
>           ps.Range(18, 18);
>           embcanvas->GetCanvas()->Draw();
>           ps.Close();
> 

Hi Ulrich,
The SetLineWidth, etc only sets the current atrtribute in PostScript.
These functions are called by the Root paint functions with arguments
corresponding to the attributes of the objects being paint. Your calls
have
no effect.
You should define a style (eg "Plain") with the corresponding
attributes.

By default, the picture on the Postscript page is drawn bottom left.
You can modify the position with TStyle::SetHeaderPS. For example
   gStyle->SetHeaderPS("300 500 translate");


> 2) I draw a frame with
> getCanvas()->DrawFrame(xmin-xmargin, ymin-ymargin,
>                                 xmax+xmargin, ymax+ymargin,
>                                 title);
> The title overlaps with the axis scaling factor ("x10**5"), can I shift
> its position to the right? Change its look and feel? How can I access this
> object?
> 

 Use TStyle::setTitleX, Y, W, etc

Rene Brun



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