Smooth sailing (and smooth lines!) in SAS 9.4 gif graphs

8

SAS 9.3 already has smooth (anti-aliased) lines in SAS/GRAPH device=png output, and in SAS 9.4 you will also get smooth lines in your device=gif output (and gif animations)!  Woo-hoo!!!

Here are a couple of simple examples to demonstrate:

The first example is device=gif Proc Gmap output.  If you look very closely, you'll notice that the borders of the states have a slight jagged/stair-step appearance in the 9.3 output, whereas the 9.4 output has smooth lines:

 

And even though you could get device=png smooth-line graphs in SAS 9.3, you could not use device=png for animations.  And gif animations did not support smooth anti-aliased lines in SAS 9.3.  Therefore it is great new functionality for SAS 9.4 gif animations to support smooth lines!  See the difference in the examples below -- The 9.4 output has smooth lines in both the state borders and the circular marker:

 

 

And here's a link to a slightly fancier gif animation (originally written by Richard DeVenezia, and which I slightly modified to use the SAS 9.4 smooth lines) ... hope you enjoy!

Fancy SAS 9.4 smooth-line gif animation

Feel free to leave a comment describing how you might use this new SAS 9.4 feature!

Share

About Author

Robert Allison

The Graph Guy!

Robert has worked at SAS for over a quarter century, and his specialty is customizing graphs and maps - adding those little extra touches that help them answer your questions at a glance. His educational background is in Computer Science, and he holds a BS, MS, and PhD from NC State University.

Related Posts

8 Comments

  1. Thanks for this demo.

    So, am I correct in thinking that the only remaining advantage for PNG over GIF is the ability to use a huge number of distinct colors in a graph, whereas GIF remains limited to 256?

    If so, I don't see that as a problem. It is exceedingly rare that a typical management or presentation graph would need a color palette even close to 256.

    I just ran a test producing text slides with PROC GSLIDE. PNG files were about two or three times as large as GIF files for the same slides.

    • Robert Allison
      Robert Allison on

      Hi LeRoy - I pretty much agree ... with the new 9.4 capabilities, I think gif is now preferable over png in most cases. There are only a few niche cases where I've ever needed more than 256 colors in a graph, and those were when I used a color photo as the background, and when I was creating a 3d cylinder graph, where the sides of the cylinder had smooth/gradient shading. Also, I think more people know/recognize what a gif file is, rather than a png file, and some older tools (such as 'xv' image viewer on an old HP Unix system I occasionally use) can display a gif but not a png file.

    • Robert Allison
      Robert Allison on

      I'll probably continue to use device=png in most of my examples, so they will produce nice-looking output for users that are running pre-9.4 SAS ... but if I were writing sas/graph programs just for my own personal use, I'd probably go with device=gif :)

  2. Pingback: Top 4 reasons to upgrade to SAS 9.4 | The SAS Training Post

  3. Christopher Mortimer on

    Maybe SAS will also put effort into improving for lack of modern design in their applications such as Enterprise Guide, Enterprise Miner and Forecast Studio which all look like applications developed for Windows 95. Anti-aliasing has been around for a long time.

Back to Top