BookmarkSubscribeRSS Feed
CPAZ
Calcite | Level 5


I have this piece of code:

/*************************************************************************************************************************************************/

goptions reset=all display dev=gif gsfname=outgraph gsfmode=replace htext=8pt htitle=12pt  ftext="Calibri";

ods listing;
ods html style=barrettsblue body="&fileh..html" path="&filebase.&version.\&area.\html_out\mean_trends\weekly\normality\" (url=none);

ODS EXCLUDE testsfornormality CIBASIC BASICMEASURES TESTSFORLOCATION EXTREMEOBS MODES MOMENTS QUANTILES ParameterEstimates GoodnessOfFit FitQuantiles  ;

title "Normality Test - &tname2" font="Calibri";
footnote "If the ""Normal Test P-Value"" is < .05 then we can conlcude the distriubtion is NOT Normal, if it is >=.05 then it is NORMAL.";

ods graphics on / imagemap=yes height=5in width=8in imagename="&fileh" reset=index;

PROC UNIVARIATE DATA = WORK.graph normal noprint;
    VAR MEASUREMENT;
    HISTOGRAM MEASUREMENT / NORMAL (W=1 L=1 COLOR=red  MU=EST SIGMA=EST) CFRAME=white CAXES=BLACK WAXIS=1  CBARLINE=BLACK CFILL=BLUE PFILL=SOLID NMIDPOINTS=20;
    inset N Mean Std normaltest probn /cframe=blue cfill=white position=ne ;
run;

ods html close;
quit;

/********************************************************************************************************************************************************/

I would like to get the title I defined inside the histogram graph that PROC UNIVARIATE produces.

I have attached the output I get.

Thanks for any help.


output.png
3 REPLIES 3
Reeza
Super User

I believe you'll need to modify the template for the univariate procedure. If you google, you can find instructions on how to do that.

Rick_SAS
SAS Super FREQ

If you only need to change the title occasionally, you could use the SG editor. See Change a plot title by using the ODS Graphics Editor - The DO Loop

Vince28_Statcan
Quartz | Level 8

Try using

title move=(x,y) "Normality Test - &tname2" font="Calibri";  /* replace x,y until you find a positioning that suits your need. */

I can't figure out what scale x and y are using but anyway it should do the trick with some trial and error.

Vincent

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 4929 views
  • 0 likes
  • 4 in conversation