%let gpath='C:\'; %let dpi=200; ods html close; ods listing gpath=&gpath image_dpi=&dpi style=htmlBlue; data synch; format Percent percent.; input Cat $ East West Percent; datalines; A 350 -100 0.1 B 500 120 0.35 C -225 180 0.5 D 400 -50 -0.1 ; run; /*--Plot of East and West by Cat--*/ ods graphics / reset width=5in height=3in imagename='Bar'; proc sgplot data=synch; vbar cat / response=east dataskin=matte nostatlabel; vline cat / response=west y2axis lineattrs=(thickness=4) nostatlabel; run; /*--Plot of East and West by Cat with synchronized axes--*/ ods graphics / reset width=5in height=3in imagename='BarSynch'; proc sgplot data=synch; vbar cat / response=east dataskin=matte nostatlabel; vline cat / response=west y2axis lineattrs=(thickness=4) nostatlabel; yaxis min=-250 max=500; y2axis min=-100 max=200; run; /*--Plot of East and Percent by Cat--*/ ods graphics / reset width=5in height=3in imagename='BarPercent'; proc sgplot data=synch; vbar cat / response=east dataskin=matte nostatlabel fillattrs=graphdata2; vline cat / response=percent y2axis lineattrs=graphdata2(thickness=4) nostatlabel; run; /*--Plot of East and Percent by Cat with synchronized axes--*/ ods graphics / reset width=5in height=3in imagename='BarPercentSynch'; proc sgplot data=synch; vbar cat / response=east dataskin=matte nostatlabel fillattrs=graphdata2; vline cat / response=percent y2axis lineattrs=graphdata2(thickness=4) nostatlabel; yaxis min=-250 max=500; y2axis min=-0.25 max=0.5; run; data temp; label c='Celsius' f='Fahrenheit'; format C F 3.0; input Month $ F; C=5*(f-32)/9; datalines; Jan 25 Feb 38 Mar 50 Apr 65 May 72 Jun 75 ; run; /*--Plot of F and C by Month--*/ title 'Mean Temperature by Month'; ods graphics / reset width=5in height=3in imagename='Temp'; proc sgplot data=temp; series x=month y=f / lineattrs=graphdata3; scatter x=month y=c / markerattrs=graphdata2(symbol=circlefilled) y2axis; refline 0 / axis=y2; xaxis display=(nolabel); run; /*--Plot of F and C by Month with synchronized axes--*/ title 'Mean Temperature by Month'; ods graphics / reset width=5in height=3in imagename='TempSynch'; proc sgplot data=temp; series x=month y=f / lineattrs=graphdata3; scatter x=month y=c / markerattrs=graphdata2(symbol=circlefilled) y2axis; refline 32; xaxis display=(nolabel); y2axis min=-5 max=25; yaxis min=23 max=77 values=(20 30 40 50 60 70 80) valueshint; run; title;