BookmarkSubscribeRSS Feed
mariko5797
Pyrite | Level 9

There are two things I want (1) header font to be Times New Roman and (2) to remove the "dosegrp2=" part of the header. How can I achieve this?

Less important, but is there a way to have a singular y-axis label and x-axis label?

I didn't use PROC SGPANEL b/c I wanted a separate legend for each treatment group.

mariko5797_0-1716405794994.png

ods graphics / border= off;
ods layout gridded columns= 3 advance= table;
proc sgplot data= sadpk;
 by dosegrp2;
 	series	x= t y= C	/ group= usubjid markers;
		xaxis	label= "Time (h)" 							labelattrs= (family= "&ffamily." size= &fsize. weight= bold)
				values= (0 0.5 1 2 4 6 8 12) 				valueattrs= (family= "&ffamily." size= &fsize.)
				offsetmax= 0.1;				
		yaxis 	label= "Concentration in Plasma (ng/mL)"	labelattrs= (family= "&ffamily." size= &fsize. weight= bold);
 keylegend / title= " " titleattrs= (family= "&ffamily." size= &fsize. weight= bold) 
			 across= 1 	noborder	position= topright	location= inside;
run;
ods layout end;
4 REPLIES 4
ballardw
Super User

Options nobyline;

should turn of the By= bits of output until you set the default Options byline;

 

You could turn of the label generated by the YAXIS statement with DISPLAY=(NOLABEL). Then provide the text in an annotate data set is about the only thing I can think of to only show one label for multiple graphs without going to SGPANEL.

 

 

PaigeMiller
Diamond | Level 26

Example of removing group label — use the title statement with #byval1, and turn off the bylines

 

proc sort data=sashelp.class out=class;
    by sex;
run;
options nobyline;
title f='Times New Roman' "#byval1";
proc sgplot data=class;
    by sex;
    scatter x=height y=weight;
run;

 

 

I don't understand the usage of the word "singular" in your other question.

--
Paige Miller
mariko5797
Pyrite | Level 9

Instead of showing a y-axis label and x-axis label for each individual plot, I was wondering if it were possible to have one x-axis and one y-axis to represent all three plots, similar to how SGPANEL may output. 

PaigeMiller
Diamond | Level 26

I don't think there is an easy way to have one Y-axis. I don't even understand the concept of one X-axis here.

--
Paige Miller

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 4 replies
  • 307 views
  • 4 likes
  • 3 in conversation