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.
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;
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.
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.
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.
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.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.