Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Graph output: wmf to gif?

From   Lee Sieswerda <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: Graph output: wmf to gif?
Date   Tue, 1 Apr 2003 11:37:31 -0500

GIF is a fine, if rather old, format for the web. Nor is GIF "fat" when used

GIF and JPEG are the most common image compression formats on the web. To
make a long story short, use GIF when you have few colours in the image.
Most Stata graphs would likely fall into this category. Use JPEG when you
have a lot of different colours, as in a colour photograph. It is more
complicated than that, but those are good rules of thumb. Here's another
simple explanation:

Some people and programs (especially free ones) won't offer GIF as an
option. There is an explanation here:

StataCorp has pointed out that Stata's implementation of PNG is experimental
at the moment. I have tried to use Stata's PNG format, but the results
appear rudimentary (maybe I'm missing something). The W3C considers PNG a
patent-free replacement for GIF. See:

The only graphic format within Stata that I have found acceptable for
publication quality graphics is EPS/PS. Actually, its more than acceptable,
it is near perfect. To my eyes, the WMF/EMF format often makes wonky
circles, text isn't spaced properly, and other problems. The image quality
in Stata's PNG implementation is jaggy, especially the text portions. The
BMP format, of course, results in very fat files and so is unacceptable.
Stata graphs in EPS format have none of these problems. Unfortunately,
however, if you (or you publisher) do not have a PostScript compatible
printer, EPS/PS can not be printed. PDF is nice and there are lots of EPS/PS
to PDF converters. 

An interesting image format that is receiving quite a bit of attention is
SVG (Scalable Vector Graphics) because it can combine raster and vector
images, as well as text, and it is written and stored in XML rather than
binary. If it lives up to its reputation, it will be the Holy Grail of 2D
portable web-friendly graphics. For those interested, see:

This is what I do with graphs (using Stata 8 Win):
1. For everyday use, I just copy and paste (WMF or EMF) into my word
2. For publication quality, 
	a) I save my graph as both WMF and as EPS. 
	b) Using Ghostscript and GSView, I attach the WMF file to the EPS as
a preview image. This allows me to view and print the graph in my word
processor. When the file is printed on a PostScript-compatible printer it
prints the flawless EPS version.
3. If I were publishing on the web on a regular basis, I would save my
graphs in EPS format and then buy/beg/borrow/steal a good image optimizer or
graphics package to convert to GIF or JPEG. Or, if I could, I'd wait and see
how good Stata's PNG implementation gets. There are a lot of image
conversion programs around. I've never used a straight image conversion
program, other than GSView. I've used DeBabelizer (which is an image
optimizer) and Fireworks, Illustrator, and Photoshop (which are
full-featured graphics apps), all of which produce industry-standard
results, but which are not particularly inexpensive.

Lee Sieswerda

> -----Original Message-----
> From:	Philippe Glaziou [SMTP:[email protected]]
> Sent:	Monday, March 31, 2003 9:30 PM
> To:	[email protected]
> Subject:	Re: st: Graph output: wmf to gif?
> David LB Schwappach <[email protected]> wrote:
> > I'm preparing a Internet presentation of a batch of graphs
> > produced by STATA. I save the graphs as wmf files and then
> > use a graphics editor to convert to gif. However, the wmf
> > files are very large and after resizing them, the gif
> > quality is worse. How do other people prepare high quality
> > STATA graphs for the web?
> PNG (portable network graphics) and JPEG formats are very
> common on the web. Gif is not such a good format on the web,
> because gif is fat.
> Different formats of the same stata graph, with size:
>   tata.eps   9981 
>   tata.png   6919 
>   tata.jpg  11114 
>   tata.gif 115882 
> My stata knows about PNG, but only from the menu (unless I
> missed something). -graph export tata.png, as(png)- does not
> work. In any case, imagemagick <>
> does the conversion between 68 major formats for free, and
> runs also under MS-windows.
> -- 
> Philippe 
> *
> *   For searches and help try:
> *
> *
> *
*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index