08-23-2016 05:17 PM
I am trying to create a uniform set of charts, as such I would like them all to have the same scale on my first axis, is there a way to set the axis so they all are the same. Here is the code I am working with, I tried to add the yaxisopts but keep getting an error.
input @1 Car $4. @6 SASDate mmddyy10. @17 OnRent 4. @22 OnRent1 4.;@22 OnRent1 4.;
%Do i = 1 %to 2;
%If &i=1 %then %do; %Let CarTypeN=Blue;%Let Vars=OnRent ;%Let C = Blue;%Let Data1=On&C.;%END;
%Else %If &i=2 %then %do; %Let CarTypeN=Grey;%Let Vars=OnRent ;%Let C = Grey;%Let Data1=On&C.;%END;
define statgraph panel;
entrytitle "&CarTypeN. On Rent by &vars.";
*layout overlay / yaxisopts=linearopts=(tickvaluesequence=(start=0 end=70 increment=10) viewmin=0 viewmax=70));
layout gridded / rowgutter=5;
layout datapanel classvars=(Car) / rowaxisopts=(griddisplay=on) columnaxisopts=(tickvalueattrs=(size=7)griddisplay=on) columns=1 headerLabelDisplay=Value cellheightmin=50;
layout prototype / cycleattrs=true;
SeriesPlot X=SASDate Y=OnRent1 / primary=true display=(markers) markerattrs=(size=9px symbol=circlefilled) lineattrs=(thickness=2px) NAME="s1";
SeriesPlot X=SASDate Y=&Vars. / yaxis=y2 display=(markers) markerattrs=(size=9px symbol=circlefilled) lineattrs=(thickness=2px) NAME="s2";
DiscreteLegend "s1" "s2" /;
ods listing style=htmlblue gpath="&graphs." image_dpi=&dpi;
ods graphics / reset width=&w height=&h imagename="&C.UteByVar";
proc sgrender data=&Data1. template="panel";
08-23-2016 06:24 PM
linearopts=(viewmin=0 viewmax=70 tickvaluelist=(0 10 20 30 40 50 60 70));
I think yaxisopts is the correct location and specified as above.
At least for survival graphs
Need further help from the community? Please ask a new question.