TGraph --> EPS/JPG/PDF

Hello there!

I’m wondering if there is any possibility to save a generated TGraph directly into a picture-file( such as EPS/GIF/JPF ) or into PDF.
I’ve been searching quite a while but everyone only seems to save his graphs into ROOT-Files, which i can’t use =)

Thanks,
Hoping for a fast Answer =)

Hi Marius,
draw the graph (which will create a canvas if you don’t do it yourself), and save the canvas with e.g. gPad->Print(“whatever.png”).
Cheers, Axel.

Hi Marius,

Another way is by using File menu / Save for saving the canvas drawing in a format selectable from the submenu. The current canvas name is used as a file name for various formats such as PostScript, GIF, JPEG, C macro file, root file, etc.

Cheers, Ilka

Thx for your answers, i made it.
I think i prefer axels way, because i’m to lazy for clicking menues.

No problem, Marius. I decided to write in case you are from the users that prefer to click twice instead of entering command/file name via interpreter.

Cheers, Ilka

For info, I found the information (“Axel way”) in some quite intuitive way from the ROOT home page by clicking on the reference guide link and then on POSTSCRIPT/TPostScript.