BookmarkSubscribeRSS Feed
mmea
Quartz | Level 8

Hi

I want to style my proc freq plot just as this.

is that possible

 

Udklip.PNG

 

2 REPLIES 2
PaigeMiller
Diamond | Level 26

It would be fairly simple to do the formatting in Excel rather than in SAS. This type of formatting can be done in SAS but it takes more effort, and I would do it in PROC REPORT rather than PROC FREQ.

 

If this is something that has to be automated, then I guess you would want to do it in SAS. Here are some examples: https://support.sas.com/resources/papers/proceedings14/SAS388-2014.pdf but there are a gazillion (well, actually a gazillion minus 7 🤣) papers out there on the internet on how to get this type of formatting from PROC REPORT.

--
Paige Miller
Reeza
Super User

Depends on how exact you want to get. You can get exactly that but it requires some work to get it formatted exactly. 

You have a couple of options:

 

  1. Use a style that's close enough and call that a day
  2. Develop your entire own style template - if you're a company and will be doing a lot of regular reporting this can definitely be worth the time investment. 
  3. Use PROC REPORT and customize the output to match what's shown below. Here's a rough idea, you'll need to customize your 
proc report data=sashelp.cars(obs=10) style(header)=[background=cx2b8cbe foreground=black] ;
column origin make model type mpg_city mpg_highway;
   compute type;
      count+1;
      if not(mod(count,2))  then do;
         call define(_row_, "style", "style=[background=lightgrey]");
      end;
   endcomp;
run;

https://support.sas.com/kb/23/647.html

(modified)

 


@mmea wrote:

Hi

I want to style my proc freq plot just as this.

is that possible

 

Udklip.PNG

 


 

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 2 replies
  • 455 views
  • 1 like
  • 3 in conversation