data torque; input Torque RPM Amps Eff; RPM=RPM/50; Amps=Amps / 5; datalines; 10 4000 95 80 20 3300 130 84 30 2800 160 86.5 40 2450 200 87.5 50 2200 230 87.6 60 2000 255 87.7 70 1840 285 87.5 80 1700 320 87 90 1600 345 86.2 100 1510 375 85.7 110 1470 395 85 120 1400 420 84 130 1400 440 83 140 1380 460 82 150 1380 480 81 ; run; /*--Two-Axis Plot--*/ proc template; define statgraph torque_gtl_2_Axis; begingraph; entrytitle 'Motor Performance Profile'; layout overlay / xaxisopts=(linearopts=(tickvaluesequence=(start=0 end=160 increment=20) tickvaluepriority=true) griddisplay=on label='Torque (Ft-Lb)') yaxisopts=(linearopts=(tickvaluelist=(0 10 20 30 40 50 60 70 80 90 100) tickdisplaylist=('0' '50' '100' '150' '200' '250' '300' '350' '400' '450' '500') tickvaluepriority=true) griddisplay=on) y2axisopts=(linearopts=(tickvaluesequence=(start=50 end=100 increment=5) tickvaluepriority=true) label='Efficiency'); regressionplot x=torque y=amps / degree=2 curvelabel='Amps'; regressionplot x=torque y=Eff / degree=2 yaxis=y2 curvelabel='Efficiency'; endlayout; endgraph; end; run; /*--Two Axis Plot--*/ ods graphics / reset width=5in height=3in imagename='Torque1'; proc sgrender data=torque template=torque_gtl_2_Axis; run; /*--Three Axis Plot--*/ proc template; define statgraph Torque_gtl_3_Axis; begingraph; entrytitle 'Motor Performance Profile'; layout lattice / rows=1 order=columnmajor columnweights=(0.12 0.88); layout overlay / walldisplay=none xaxisopts=(display=none linearopts=(tickvaluesequence=(start=0 end=160 increment=20) tickvaluepriority=true)) yaxisopts=(linearopts=(tickvaluelist=(0 10 20 30 40 50 60 70 80 90 100) tickdisplaylist=('0' '500' '1000' '1500' '2000' '2500' '3000' '3500' '4000' '4500' '5000') tickvaluepriority=true) display=(tickvalues label)); seriesplot x=torque y=rpm / lineattrs=(thickness=0); endlayout; layout overlay / xaxisopts=(linearopts=(tickvaluesequence=(start=0 end=160 increment=20) tickvaluepriority=true) griddisplay=on label='Torque (Ft-Lb)') yaxisopts=(linearopts=(tickvaluelist=(0 10 20 30 40 50 60 70 80 90 100) tickdisplaylist=('0' '50' '100' '150' '200' '250' '300' '350' '400' '450' '500') tickvaluepriority=true) griddisplay=on display=(ticks tickvalues label) label='Amps') y2axisopts=(linearopts=(tickvaluesequence=(start=50 end=100 increment=5) tickvaluepriority=true) display=(tickvalues ticks label) label='Efficiency'); regressionplot x=torque y=rpm / degree=2 curvelabel='RPM'; regressionplot x=torque y=amps / degree=2 curvelabel='Amps'; regressionplot x=torque y=Eff / degree=2 yaxis=y2 curvelabel='Efficiency'; endlayout; endlayout; endgraph; end; run; /*--Three Axis Plot--*/ ods graphics / reset width=5in height=3in imagename='Torque2'; proc sgrender data=torque template=Torque_gtl_3_Axis; run; /*--Three Axis Plot with color and Outer Axis Labels--*/ proc template; define statgraph Torque_gtl_3_Axis_OuterLabel; begingraph; entrytitle halign=left textattrs=graphdata1(size=9pt weight=normal) 'RPM' halign=left textattrs=graphdata2(size=9pt weight=normal) ' Amps' halign=center textattrs=(size=11pt) 'Motor Performance Profile' halign=right textattrs=graphdata3(size=9pt weight=normal) 'Eff %'; layout lattice / rows=1 order=columnmajor columnweights=(0.08 0.92); layout overlay / walldisplay=none xaxisopts=(display=none linearopts=(tickvaluesequence=(start=0 end=160 increment=20) tickvaluepriority=true)) yaxisopts=(linearopts=(tickvaluelist=(0 10 20 30 40 50 60 70 80 90 100) tickdisplaylist=('0' '500' '1000' '1500' '2000' '2500' '3000' '3500' '4000' '4500' '5000') tickvaluepriority=true) display=(tickvalues) tickvalueattrs=graphdata1); seriesplot x=torque y=rpm / lineattrs=(thickness=0); endlayout; layout overlay / xaxisopts=(linearopts=(tickvaluesequence=(start=0 end=160 increment=20) tickvaluepriority=true) griddisplay=on label='Torque (Ft-Lb)') yaxisopts=(linearopts=(tickvaluelist=(0 10 20 30 40 50 60 70 80 90 100) tickdisplaylist=('0' '50' '100' '150' '200' '250' '300' '350' '400' '450' '500') tickvaluepriority=true) griddisplay=on display=(ticks tickvalues) tickvalueattrs=graphdata2) y2axisopts=(linearopts=(tickvaluesequence=(start=50 end=100 increment=5) tickvaluepriority=true) display=(ticks tickvalues) tickvalueattrs=graphdata3); regressionplot x=torque y=rpm / degree=2 curvelabel='RPM' curvelabelattrs=graphdata1 lineattrs=graphdata1(pattern=solid); regressionplot x=torque y=amps / degree=2 curvelabel='Amps' curvelabelattrs=graphdata2 lineattrs=graphdata2(pattern=solid); regressionplot x=torque y=Eff / degree=2 yaxis=y2 curvelabel='Efficiency' curvelabelattrs=graphdata3 lineattrs=graphdata3(pattern=solid); dropline y=79 x=110 / dropto=y lineattrs=graphdata2(pattern=dash thickness=1); dropline y=79 x=110 / dropto=x lineattrs=(pattern=dash thickness=1); dropline y=85.5 x=110 / dropto=y yaxis=y2 lineattrs=graphdata3(pattern=dash thickness=1); dropline y=27.5 x=110 / dropto=y lineattrs=graphdata1(pattern=dash thickness=1); endlayout; endlayout; endgraph; end; run; /*--Three Axis Plot with color and Outer Axis Labels--*/ ods graphics / reset width=5in height=3in imagename='Torque3'; proc sgrender data=torque template=Torque_gtl_3_Axis_OuterLabel; run;