BookmarkSubscribeRSS Feed
mariko5797
Pyrite | Level 9

As the title suggests, I want the text of the y-axis to wrap around. It's currently named based off the label given in the dataset. When I run PROC SGPLOT on all BMI groups, there isn't an issue. But with PROC SGPANEL, the label isn't being wrapped. How can I fix this?

proc sgpanel data = work;
 panelby BMIGRP / layout = panel columns = 3 spacing = 10 novarname;
 scatter x = INF y = ADJDV / group = BMIGRP;
 refline 0.5 1 1.5 / axis = x lineattrs = (pattern = dash);
 keylegend / title = "BMI Group" noborder;
run;
2 REPLIES 2
ballardw
Super User

Can you provide more details , maybe as an image, of what you mean by "wrap around Y-axis".

The only thing I think of with that phrase doesn't make any sense so obviously I am missing something.

 

Better would be to actually provide example data in the form of a data step OR use your Sgpanel code with one of the SAS supplied data sets.

 

The ROWAXIS statement normally is where to start with Y axis appearance in Sgpanel.

djrisks
Barite | Level 11

Hi @mariko5797,

 

You can use the ROWAXIS statement and the LABEL option to explicitly create your own Y-Axis label. You can also use the SPLITCHAR option if you want to have your axis label go on multiple lines.

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
  • 746 views
  • 0 likes
  • 3 in conversation