Representing graphs in GIF or PDF format

Is there a way to represent graphs from matplotlib in the GIF orPDF form?

Thanks
Stephanie Wilson

Stephanie Wilson wrote:

Is there a way to represent graphs from matplotlib in the GIF orPDF form?

matplotlib doesn't directly generate gif/pdf, but it does generate png (a good gif replacement) and eps. In a *nix environment, you can use the convert utility (command line) to make a gif out of a pdf if you really need a gif, and either convert also for png->pdf, or epstopdf for eps->pdf.

I'm sure that similar utilities exist for win32 (you don't specify your platform), but convert is part of ImageMagick, which you can install for win32 if you need it.

Regards,

f

Fernando Perez wrote:

Stephanie Wilson wrote:

Is there a way to represent graphs from matplotlib in the GIF orPDF form?

matplotlib doesn't directly generate gif/pdf, but it does generate png (a good gif replacement) and eps. In a *nix environment, you can use the convert utility (command line) to make a gif out of a pdf if you really need a gif,

                                                 ^^^
                                           READ: png

sorry for the typo (you can also do it from a pdf, but it's more common to do 'convert foo.png foo.gif', and that's what I was trying to say)

f

Stephanie Wilson wrote:

Is there a way to represent graphs from matplotlib in the GIF orPDF form?

Thanks
Stephanie Wilson

On a mac, you can save the plot as eps, then open it with Preview.app ("open foo.eps" on the command line, or just double click on it in the finder). You can then save it as pdf from Preview.

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/CDC R/CDC1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

I use Irfanview for Win32 image stuff.
You can easily batch convert a ton of images to most any format.
I like png, but if you need a gif Irfanview can make that easily enough.

Travis

···

On Thu, 19 May 2005 12:23:57 -0600, "Fernando Perez" <Fernando.Perez@...179...> said:

Stephanie Wilson wrote:
> Is there a way to represent graphs from matplotlib in the GIF orPDF form?

matplotlib doesn't directly generate gif/pdf, but it does generate png (a
good
gif replacement) and eps. In a *nix environment, you can use the convert
utility (command line) to make a gif out of a pdf if you really need a
gif,
and either convert also for png->pdf, or epstopdf for eps->pdf.

I'm sure that similar utilities exist for win32 (you don't specify your
platform), but convert is part of ImageMagick, which you can install for
win32
if you need it.

Regards,

f

-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--
  Travis Brady
  tdbrady@...146...