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.
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.
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
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
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.