BookmarkSubscribeRSS Feed
Jack1
Obsidian | Level 7

Hello,

 

I am creating a panel graph in SAS with 3 columns.  The vertical axis is fine.  I want to change the range of the horizontal scale for each of the panels from the SAS default to the following: 

 

first panel: range of 0 to 20

second panel: 60 to 98 

third panel: 0 to 18

 

If possible, how do I insert this into my code:

 

PROC SGPANEL DATA=domestic.graphics;
PANELBY Service /novarname layout=panel columns=3 HEADERATTRS=(Color=red Family='Arial Narrow/Bold' Size=12 Weight=Bold) ;
hbar naics / response= mkt_usage datalabel datalabelfitpolicy=none nooutline ;
colaxis label=' '; 
rowaxis display=(nolabel) colorbands=odd colorbandattrs=(transparency=0.5) labelattrs=(family='Arial Narrow') valueattrs=(size=7pt);
RUN;



Thanks

2 REPLIES 2
collinelliot
Barite | Level 11

I think to have those very specific axis values will require using proc template and sgrender.

 

However, you can use the uniscale=rows and that will allow you to have different scales on the column (x) axis.

Ksharp
Super User

Try another two options.But still can't define the Y axis.

Suggest post it at ODS Graphic forum.

 

 

PROC SGPANEL DATA=domestic.graphics;
PANELBY Service /novarname 
layout=panel columns=3 
HEADERATTRS=(Color=red Family='Arial Narrow/Bold' Size=12 Weight=Bold) 

 proportional uniscale=row/column
 
;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 739 views
  • 0 likes
  • 3 in conversation