Data visualization with SAS programming

turn x-axis value 90 degrees to display vertically

Reply
Frequent Contributor
Posts: 119

turn x-axis value 90 degrees to display vertically

I am using this code:

 

PROC SGPANEL data=GreatData;
	panelby Cat / COLUMNS= 10 NOVARNAME;
	vbox BlaDiBla / CATEGORY=Bla NOOUTLIERS;
	rowaxis min=0 max=100;
RUN;

but would like SAS to display my x axis label turned by 90 degrees - i.e. vertically.

 

I searched and tried to digest the doc and believe it has to do with this bit:

 

rowaxis min=0 max=100 valueattrs=;

but did not get anything to work. Thanks.

 

Btw, can anyone please recommend a good book discussing everything related to 'graphing in SAS' like the above? Thanks!

 

 

PROC Star
Posts: 847

Re: turn x-axis value 90 degrees to display vertically

Posted in reply to csetzkorn

SAS 9.4m5 does this pretty easily with PROC SGPLOT as described in the article New Features with SAS 9.40 M5, but i dont think it applies to PROC SGPANEL.

 

Have not tried this, but perhaps use the LABELPOS=DATACENTER option in the ROWAXIS statement Smiley Happy

 

As for a recommendation, I recommend Statistical Graphics Procedures By Example.

 

Frequent Contributor
Posts: 119

Re: turn x-axis value 90 degrees to display vertically

Thanks your suggestion does not work.
Super User
Posts: 11,517

Re: turn x-axis value 90 degrees to display vertically

Posted in reply to csetzkorn

csetzkorn wrote:
Thanks your suggestion does not work.

When it comes to SG graphics procedures you really need to tell us which version of SAS you are using as every release since 9.1.3 has had pretty major changes in the features available.

 

Rowaxis controls the appearance of the Yaxis (the row component).

 

Colaxis controls the Xaxis. In SAS 9.4 I have the colaxis option Valuesrotate= vertical to rotate the xaxis values.

SAS Super FREQ
Posts: 1,183

Re: turn x-axis value 90 degrees to display vertically

Posted in reply to csetzkorn

To maximize your chance of getting quick help, and to make it easier for other people to help, please always include full code with sample data that others can run to see what is happening.  Also always include the release version of your SAS software.

SAS Super FREQ
Posts: 373

Re: turn x-axis value 90 degrees to display vertically

Posted in reply to csetzkorn

A book that explains everything?  No.  But between the ODS Graphics documentation, my free books, SAS/STAT documentation,  Sanjay's books, and the graphically speaking blog, a whole lot is explained!

 

Graphically Speaking SAS Blog
http://blogs.sas.com/content/graphicallyspeaking/

Basic ODS Graphics Examples
http://support.sas.com/documentation/prod-p/grstat/9.4/en/PDF/odsbasicg.pdf
Advanced ODS Graphics Examples
http://support.sas.com/documentation/prod-p/grstat/9.4/en/PDF/odsadvg.pdf
SAS/STAT introductory chapters
http://support.sas.com/documentation/onlinedoc/stat/141/ods.pdf
http://support.sas.com/documentation/onlinedoc/stat/141/odsgraph.pdf
http://support.sas.com/documentation/onlinedoc/stat/141/templt.pdf
http://support.sas.com/documentation/onlinedoc/stat/141/kaplan.pdf
Books by Sanjay Matange and Dan Heath
http://support.sas.com/publishing/authors/matange.html

Ask a Question
Discussion stats
  • 5 replies
  • 155 views
  • 2 likes
  • 5 in conversation