BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello all, looking for a hand here.

I have created a graph using EG and manual coding for formatting of the graph. My code creates three graphs, one for each of the 3 scenarios in my data. Instead of displaying the somewhat criptic Procedure Title (Scenario_Name-ScenX56463 for example), I would like to rename this Procedure Title in the three graphs to something more descriptive such as Scenario X - Cost Based Analysis for the first graph, Scenario Y - Bid Cost Analysis for the second and Scenario Z - High Cost Analysis in the third. Is there any way of simply renaming the Procedure Title?

Thanks,
B
5 REPLIES 5
Cynthia_sas
Diamond | Level 26
Hi:
Generally, SAS/Graph does not put the PROCEDURE title into the graph output -- however, if you chose "group by" in the EG task, then SAS/Graph probably has inserted a BY statement into your SAS/Graph code and this is usually the "sub title" that you see under the regular title in your Graph output.

What you can do is change the label for your Scenario_Name variable to be something like "Scenario" and then have a user defined format for your values -- something like this (proc format should be completely ABOVE/BEFORE/OUTSIDE the SAS/Graph code):
[pre]
proc format;
value $sn 'ScenX56463' = 'X - Cost Based Analysis'
'ScenY56464' = 'Y - Bid Cost Analysis'
'ScenZ56465' = 'Z - High Cost Analysis';
run;
[/pre]

Then you'd need to add a format statement and a label statement inside your Graph code like this:

[pre]
proc gwhatever ... ;
by Scenario_Name;
....more code... ;
label Scenario_Name = 'Scenario';
format Scenario_Name $sn.;
run;
quit;
[/pre]

cynthia
deleted_user
Not applicable
Perfect! Thank you Cynthia!
deleted_user
Not applicable
Follow up on my previous issue. Now how do I change the font size of the Sub Title?

Thanks!
Cynthia_sas
Diamond | Level 26
Hi:
Look at the doc on the GOPTIONS statement. The CBY= and FBY= options would alter the color and font respectively of the BYLINE.
cynthia
deleted_user
Not applicable
Thanks got it.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 1175 views
  • 0 likes
  • 2 in conversation