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";
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.