BookmarkSubscribeRSS Feed
somebody
Lapis Lazuli | Level 10

How can I add a text or footnote that takes the value of a variable? So it changes  depending on the BY group

2 REPLIES 2
PeterClemmensen
Tourmaline | Level 20

Why not let SAS do that by itself?

 

proc sgplot data=sashelp.iris;
	scatter x=sepallength y=sepalwidth;
	by species;
run;

Result

 

 

Capture.PNG

PaigeMiller
Diamond | Level 26

If the BY statement default text (as shown by @PeterClemmensen) are not exactly what you want, you can add the BY variable name and/or BY variable value into the TITLE or FOOTNOTE statement text, as described here:

https://documentation.sas.com/?docsetId=grstatproc&docsetTarget=n1ukd9sqgqiwwhn1mrx4c1rbse1j.htm&doc...

 

which applies to all SAS procedures, not just PROC SGPLOT.

--
Paige Miller

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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