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
SAS Super FREQ
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
SAS Super FREQ
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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 5 replies
  • 658 views
  • 0 likes
  • 2 in conversation