graphs on web: technical question

I want to post information that consists of ~200  graphs on my web site in a format that will be accessible to the most people.  I don’t want to spend a ton of time doing this and would prefer to have the files as small as possible.  I am generating the graphs in Stata, which can produce files in these formats: wmf, pdf, png, tif; I can also have software that can translate into these formats: jpg, gif, bmp.   The .wmf graphs I produced are mostly 8-10 kb each, but there is another set that are 70-100kb each.  What format do you suggest I put them into?  If you want to give feedback about legibility etc issues based on more detailed knowledge of what is in them, please let me know and we can communicate privately.

Advertisements

Author: olderwoman

I'm a sociology professor but not only a sociology professor. It isn't hard to figure out my real name if you want to, but I keep it out of this blog because I don't want my name associated with it in a Google search. Although I never write anything in a public forum like a blog that I'd be ashamed to have associated with my name (and you shouldn't either!), it is illegal for me to use my position as a public employee to advance my religious or political views, and the pseudonym helps to preserve the distinction between my public and private identities. The pseudonym also helps to protect the people I may write about in describing public or semi-public events I've been involved with.

9 thoughts on “graphs on web: technical question”

  1. PNG is a good compressed-image format that maximizes legibility and any browser will display it. If you want them all displayed on a web page or pages, I would use PNG files. Definitely not wmf, tif or bmp. If accessibility is important, I’d also give some thought to the design of the page you put the images up on.

  2. Thanks. I have thought about web page layout, although I have not figured it all out yet. It occurs to me that I could also bundle them in zip files for people who want to just download them.

  3. I could also bundle them in zip files for people who want to just download them.

    If you’re going to put up a bundle of files in an archive, I’d use PDF: the quality of the images will be much higher than many of the others, especially if the target audience want to print out any of them. (PDF is a device- and resolution-independent format, which in practice means you can enlarge images without loss of detail. PNG and other image formats work for webpages but will look relatively poor bad if printed out.)

    For relatively simple images — the ones in the 8-10k range — the PDFs shouldn’t be that much bigger in absolute terms than PNG files. It won’t be enough to make a difference to anyone downloading them over a broadband connection. Even for more complex files the difference may be small enough to tolerate, though if you’re plotting many thousands of data points the PDFs will get large.

    All of this is somewhat conditioned on the target audience and the purpose of the files. But if the audience is mostly on broadband making PDFs available alongside PNG files is probably the best option.

  4. I think something like, “graph export myfile.png, width(800)” should work, although you would want to play around with the width value. The help file for this in Stata is under, “help png_options”

  5. Update. I decided PDFs would be best as they are readable on the web but also downloadable and printable. Stata-produced png files remained fuzzy, too fuzzy for the graphics that require high resolution to be legible. Also, the png graphs produced by Stata include a blur of grey around all graphical elements that is unnoticeable on the screen when ported into Adobe but prints as black when the PDF graph is printed in monochrome — making it completely illegible. I ended up producing the PDF files in two ways (for different types of graphs): (1) using my photo manager software & Adobe distiller to print the wmf files to PDF and (2) using Stata to produce ps files that Adobe could import directly. As the ps files cannot be viewed, I saved all the graphs from (2) in two formats, so I could both preview and check them and then assemble into PDF.

    Lessons to remember: (1) Public sociology stuff, if it is used at all, tends to get passed around and photocopied. Always test how something looks when printed in low-resolution monochrome. (2) Producing something that will work on both the web and paper is a set of trade-offs.

    I don’t know whether this kind of stuff is worth its own separate post as I don’t know how many people out there do this form of auto-publication.

  6. I think a separate “lessons learned” post may be helpful for those who didn’t bother to keep checking the comments here thinking they were too technical to interest them. The general point is less technical and more generalizable thus worth for more people to see.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s