Graphics Programming

Data visualization using SAS programming, including ODS Graphics and SAS/GRAPH. Charts, plots, maps, and more!
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
morglum
Quartz | Level 8

Hi everyone (and happy new year!),

I've just  got my hands on Stephen Few's "Show me the numbers" and would like to implement to most basics advice automatically by creating a template/style.  Has anyone already created a template that would set the layout automatically (colors, borders, font,..) ?

 

cheers!

 

1 ACCEPTED SOLUTION

Accepted Solutions
morglum
Quartz | Level 8

It's not perfect, but here's my template, along with examples of use with proc report and proc sgplot.

 

** EDIT  here's my new shade of  light grey for background shading.
%let verylightgrey = %rgb(245,245,245);

View solution in original post

8 REPLIES 8
Reeza
Super User

SAS supports CSS in many procedures so you can use that. I don't know about Stephen Few's CSS, but Edward Tufte has a CSS out that may be helpful.

https://github.com/edwardtufte/tufte-css

 

And SAS's documentation on CSS:

http://support.sas.com/rnd/base/ods/templateFAQ/Template_csstyle.html

I'd also be interested in a Stephen Few/Edward Tufte SAS/CSS style sheet. I find design not entirely SAS forte.

morglum
Quartz | Level 8

Thanks Reeza for the links.  I wasnt aware of it and it looks great.  I'll give it a look as it is very interesting and a good starting point, but I'm afraid learning CSS will have to wait as work is resuming soon.

 

 

ballardw
Super User

I recommend investigating the various SAS supplied style templates. If one is close to what you need then modifying a few elements is going to be much easier than creating one from scratch.

 

Create a couple of small example data sets to print and graph basic elements and then write a program that loops over the various installed styles to create a document with the same output using the various styles.

Rick_SAS
SAS Super FREQ

This is a very common topic at conferences, so there are multiple papers written about how to use PROC TEMPLATE to create a custom style.  Go to your favorite internet search engine and search for

   sas "proc template" style

If you want to restrict yourself to SAS papers and documentation, add

   site:sas.com

 

If you want a reference book, Kevin Smith wrote the book PROC TEMPLATE Made Easy.

morglum
Quartz | Level 8

It's not perfect, but here's my template, along with examples of use with proc report and proc sgplot.

 

** EDIT  here's my new shade of  light grey for background shading.
%let verylightgrey = %rgb(245,245,245);

Reeza
Super User

Thank You!!!

That looks like a nice style. I've placed a copy on github for quick access in the future and if I update it, I'll post it there as well.

 

https://gist.github.com/statgeek/9845cc3d26e4c35e01a2

morglum
Quartz | Level 8

Thanks!

One thing I'm looking for is the ability to set different a color palette for small objects vs larger objects.

 

For example, lines would use the medium palette, while bars would use the light palette.

morglum
Quartz | Level 8

I've changed the background shading of the alternate rows.  Here's my new shade of grey.

 

*** very light grey est utilisé pour le background shading;
%let verylightgrey = %rgb(245,245,245);

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 8 replies
  • 3268 views
  • 4 likes
  • 4 in conversation