Data visualization with SAS programming

ODS HTML and PROC UNIVARIATE Histogram not showing correct title

Reply
Contributor
Posts: 30

ODS HTML and PROC UNIVARIATE Histogram not showing correct title


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.

Attachment
Grand Advisor
Posts: 17,320

Re: ODS HTML and PROC UNIVARIATE Histogram not showing correct title

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.

SAS Super FREQ
Posts: 3,406

Re: ODS HTML and PROC UNIVARIATE Histogram not showing correct title

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

Super Contributor
Posts: 339

Re: ODS HTML and PROC UNIVARIATE Histogram not showing correct title

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

Ask a Question
Discussion stats
  • 3 replies
  • 1068 views
  • 0 likes
  • 4 in conversation