BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
antor82
Obsidian | Level 7

Hi All

 

I would like to finalise the attached figure

antor82_0-1586880087387.png

by adding at the bottom of the image the legends for the fit line, 95% confidence limits and 95% prediction limits.

 

Something like this 

Regr_Amil_AL.png

 with only one legend at the end of the three graphs.

 

Tks in advance

 

AntoR82

1 ACCEPTED SOLUTION

Accepted Solutions
JeffMeyers
Barite | Level 11

Since you are using a lattice layout (I'm assuming) you should have access to the SIDEBAR blocks.  Add something like this to your graph (before the LAYOUT OVERLAY blocks):

 

SIDEBAR / align=bottom;
     discretelegend "Fit" "CI" / your desired options;
ENDSIDEBAR;

Then in ONE of your three graphs add the NAME option to name the graph "Fit" or "CI" (I don't know if these come from the same statement or not) and it should add that one graph to your legend.

layout overlay / options;
     YOURGRAPHSTATEMENT ... / NAME="Fit" other options;
endlayout;

View solution in original post

3 REPLIES 3
ballardw
Super User

If you are looking for suggestions to modify code then you need to supply the code you are currently using. If you have created a template then we need to see the code for the template. Otherwise we have no place to start with suggestions.

Best would be to include example data in the form of data step code and the Proc Sgrender code used to apply the template as well.

JeffMeyers
Barite | Level 11

Since you are using a lattice layout (I'm assuming) you should have access to the SIDEBAR blocks.  Add something like this to your graph (before the LAYOUT OVERLAY blocks):

 

SIDEBAR / align=bottom;
     discretelegend "Fit" "CI" / your desired options;
ENDSIDEBAR;

Then in ONE of your three graphs add the NAME option to name the graph "Fit" or "CI" (I don't know if these come from the same statement or not) and it should add that one graph to your legend.

layout overlay / options;
     YOURGRAPHSTATEMENT ... / NAME="Fit" other options;
endlayout;
antor82
Obsidian | Level 7
Tks @JeffMeyers!

exactly what I wanted!!!
I've tried before with layout globallegend, but this excluded any other descretelegend that I've specified before!

Tks a lot!!!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 749 views
  • 2 likes
  • 3 in conversation