08-17-2017 03:40 PM
Good day! So I'm learning to use SAS and I've been all day trying to put percentages in the y axis, but the right one. My current graph already uses reflines but I want to replace the reflines for a percentage scale from 0 to 100% in 10 by 10. Is there a way to do it?
I'm on SAS 9.3
08-21-2017 10:10 PM
proc summary data=SASHELP.PRDSAL2 ; where YEAR eq 1995; class MONYR; var ACTUAL PREDICT; output out=SUMMARY sum=; run; data PLOT; if _N_=1 then set SUMMARY(where=(MONYR eq .) rename=(ACTUAL=TOTAL) ); set SUMMARY(where=(MONYR ne .) ); retain TOTAL; PCT+ACTUAL/TOTAL; format PCT percent10.1; run; proc sgplot data=PLOT; vbar monyr / response=ACTUAL ; vline monyr / response=PCT y2axis; run;