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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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