Help using Base SAS procedures

Renaming SAS PROCEDURE TITLE in Graph

Reply
N/A
Posts: 0

Renaming SAS PROCEDURE TITLE in Graph

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
SAS Super FREQ
Posts: 8,740

Re: Renaming SAS PROCEDURE TITLE in Graph

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
N/A
Posts: 0

Re: Renaming SAS PROCEDURE TITLE in Graph

Perfect! Thank you Cynthia!
N/A
Posts: 0

Re: Renaming SAS PROCEDURE TITLE in Graph

Follow up on my previous issue. Now how do I change the font size of the Sub Title?

Thanks!
SAS Super FREQ
Posts: 8,740

Re: Renaming SAS PROCEDURE TITLE in Graph

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
N/A
Posts: 0

Re: Renaming SAS PROCEDURE TITLE in Graph

Thanks got it.
Ask a Question
Discussion stats
  • 5 replies
  • 110 views
  • 0 likes
  • 2 in conversation