I used the following template to fit 2 histograms on the same image.
proc template;
define statgraph Auszahlungshist;
begingraph;
entrytitle "Auszahlungsquoten"; /** optional title **/
layout overlay / xaxisopts=(label="Auszahlungsquote");
/** first plot: a histogram **/
histogram NGS_Auszahlungsquote_&Jahr11. / name="AuszahlungsQ19"
binwidth=0.02;
/** second plot: a semi-transparent histogram **/
histogram NGS_Auszahlungsquote_&Jahr12. / name="AuszahlungsQ18"
binwidth=0.02 datatransparency=0.7
fillattrs=(color=red);
/** optional: add legend by specifying names **/
discretelegend "AuszahlungsQ19" "AuszahlungsQ18";
endlayout;
endgraph;
end;
run;
proc sgrender data=Daten4Dashboard3 template=Auszahlungshist;
run;
In addition, I tried to add a normal fitting curve to the 2 histograms in the template. I cannot achieve this.
Do you have a way to do this?