BookmarkSubscribeRSS Feed
LLOUKINE
Calcite | Level 5

How I can add a title for each plot i request in proc reg? 

 

ods graphics on


proc reg data=MyDat;
model y=x;
plot residual.*x;
plot residual.*y;
plot residual.*predicted.;
plot residual.*nqq. / nostat nomodel noline;
run;
ods graphics off;

 

It is a probably simple option but I cannot find it. 

Thank you!

5 REPLIES 5
PaigeMiller
Diamond | Level 26

Does the question mean: same title for each plot? Or does the question mean different title for each plot?

--
Paige Miller
LLOUKINE
Calcite | Level 5

a different title for each plot.

PaigeMiller
Diamond | Level 26

Example:

 

proc reg data=sashelp.cars;
    title 'Regression Horsepower predicting MSRP';
    model msrp=horsepower;
run;
    title 'Plot Residual vs X';
    plot residual.*horsepower;
run;
    title 'Plot Residual vs Y';
    plot residual.*msrp;
run;
quit;

 

--
Paige Miller
LLOUKINE
Calcite | Level 5

thank you! I appreciate it. let me try.

LLOUKINE
Calcite | Level 5

It works but it is not exactly what I want. I would like to have a title inside the plat area. When I send the proc reg output to excel the plots are kinds of floating there. they can be easily moved, so I would like the plot title be on an image (inside the plot area). In that case if the plot is moved it can be easy identified by the title that is attached to the image. 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 5445 views
  • 0 likes
  • 2 in conversation