RE: save a pad in eps

From: Olivier Couet <Olivier.Couet_at_cern.ch>
Date: Mon, 19 May 2008 11:53:57 +0200


The answer to your question about the marker size is here: http://root.cern.ch/root/html/TAttMarker.html#M3

-----Original Message-----
From: Margar Simonyan [mailto:margar.simonyan_at_gmail.com] Sent: Monday, May 19, 2008 11:43 AM
To: Olivier Couet
Cc: roottalk_at_root.cern.ch
Subject: Re: [ROOT] save a pad in eps

Hello

I would like to have the output in eps format since it can be easily used with latex and I expect to have better quality figures with eps compare to bitmap formats.

For the moment I don't have short macro to reproduce the problem (will write one later), but let me explain more the problem and ask questions.

I create a canvas (canvas1), divide it into 6 pad and draw two histograms in on of the pads. I save the pad (pad1) as 1.eps and it is attached. Then I create second canvas (canvas2) and do

pad1->SetPad(0.1, 0.1, 0.9, 0.9);
pad1->Draw();

and print it again, see 2.eps. The size of eps files are not very different, but the quality is. Why the markers are so large in 1.eps such the error bars are not visible ?

Since eps is vector format I was expecting that the output should not depend on how large is the pad in the screen, is this correct ? The first canvas is divided into several pads and the pad I save is smaller than in the second canvas. This is the only difference. Using  SetCanvasSize() and setting the size of the first canvas two large values does not help to get good quality eps file.

Thanks,

             Margar

On Fri, May 16, 2008 at 5:16 PM, Olivier Couet <Olivier.Couet_at_cern.ch> wrote:
> Hi,
>
> The only problem I can see with your file 1.eps is its size; it is
> very small and therefore it is hard to see something on it. Do you
> have some macro we can use to reproduce the problem ? eps and ps files

> are vector output and high quality. Usually they are much better than
> what you get on the screen (when you print them)... Have you tried to
> print it ? if you do not want to print this picture and you need only
> a bitmap output which will be exactly like your original window, you
> can use one of the bitmap format like gif or png .. but, once again,
> eps/ps are usually much better than screen.
>
> Cheers, O.Couet
>
> -----Original Message-----
> From: owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch]
> On Behalf Of Margar Simonyan
> Sent: Friday, May 16, 2008 5:05 PM
> To: roottalk_at_root.cern.ch
> Subject: [ROOT] save a pad in eps
>
> Hello
>
> I am using ROOT 5.18 and have problem saving a pad into eps format.
>
> I have a canvas with several pads and by right clicking on a pad and
> selecting SaveAs I save it in eps format. The result is attached, see
> 1.eps. The quality of the plot is pure, the markers don't look good,
> though on my screen they look nice. In order to demonstrate it I use
> import to capture the pad from my screen without changing anything.
> The resulting file is available on
> /afs/cern.ch/user/s/simonyan/public/2.eps
>
> Please note, that in the second
> case the error bars are clearly visible (twice larger than markers)
> while in the first case they are almost invisible.
>
> Does someone have a suggestion ? Usually this problem happens when
> there are several pads in a canvas. It is somewhat inconvenient to
> create separate canvas for each plot and would be nice to have a
solution.
>
> Thanks,
> Margar
>
> P.S. is there any limitation on the attachment size in roottalk, I was

> not able to post this message with the second file attached.
>
> --
> ----------------------------------------------------------------------
> --
> ------------------------------
> Margar Simonyan post-doctoral researcher LAPP, 9 Chemin de Bellevue,

> BP 110 F-74941, Annecy-le-Vieux
> Tel: +33450091785 +41227671123 (CERN)
> ----------------------------------------------------------------------
> --
> -----------------------------
>

--
------------------------------------------------------------------------
------------------------------
 Margar Simonyan         post-doctoral researcher
 LAPP, 9 Chemin de Bellevue, BP 110 F-74941, Annecy-le-Vieux
 Tel: +33450091785     +41227671123 (CERN)
------------------------------------------------------------------------
-----------------------------
Received on Mon May 19 2008 - 11:54:02 CEST

This archive was generated by hypermail 2.2.0 : Mon May 19 2008 - 17:50:02 CEST