BookmarkSubscribeRSS Feed
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;
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.

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.



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 3 in conversation