Hi,
I have a problem where I have to use custom made GTL graphics and move them into RTF. After the SAS update of 9.3 or 9.4 the graphics started to look like s*** in rtf environment. I found out that it is due to the subpixeling feature.
I have no issues disabling the subpixeling by introducing the NOSUBPIXEL option on SGPLOT etc. however when using GTL and SGRENDER I have no clue how to achieve this.
is stated that you can give this option on the ODS GRAPHICS statement, but when used I get an error of unknown option. I also should have the 3rd mainentance update installed.
Can I implement this somehow inside the template? Any help is much appreciated!
Hi
The BEGINGRAPH statement in GTL does have a subpixel=off option.
You can use the TMPLOUT= option to see the GTL code generated by Proc SGPLOT:
proc sgplot
data=sashelp.cars
nosubpixel
tmplout="c:\temp\sgplot.sas"
;
vbar type / group=origin;
run;
Is translated into
proc template;
define statgraph sgplot;
dynamic _NEGATIVE_;
dynamic _ticklist_;
begingraph / collation=binary subpixel=off;
layout overlay / yaxisopts=(labelFitPolicy=Split) y2axisopts=(labelFitPolicy=Split) xaxisopts=(type=Discrete discreteOpts=(tickValueList=_ticklist_ tickvaluefitpolicy=SplitRotate tickValueListPolicy=Union)) x2axisopts=(type=Discrete discreteOpts=(tickValueList=_ticklist_ tickvaluefitpolicy=SplitRotate tickValueListPolicy=Union)) yaxisopts=(linearopts=(Integer=true));
BarChartParm X=Type Y=_FREQUENCY_ / primary=true Group=Origin LegendLabel="Frequency" NAME="VBAR";
DiscreteLegend "VBAR"/ title="Origin";
endlayout;
endgraph;
end;
run;
Also check the doc for the BEGINGRAPH statement
Bruno
Hi
The BEGINGRAPH statement in GTL does have a subpixel=off option.
You can use the TMPLOUT= option to see the GTL code generated by Proc SGPLOT:
proc sgplot
data=sashelp.cars
nosubpixel
tmplout="c:\temp\sgplot.sas"
;
vbar type / group=origin;
run;
Is translated into
proc template;
define statgraph sgplot;
dynamic _NEGATIVE_;
dynamic _ticklist_;
begingraph / collation=binary subpixel=off;
layout overlay / yaxisopts=(labelFitPolicy=Split) y2axisopts=(labelFitPolicy=Split) xaxisopts=(type=Discrete discreteOpts=(tickValueList=_ticklist_ tickvaluefitpolicy=SplitRotate tickValueListPolicy=Union)) x2axisopts=(type=Discrete discreteOpts=(tickValueList=_ticklist_ tickvaluefitpolicy=SplitRotate tickValueListPolicy=Union)) yaxisopts=(linearopts=(Integer=true));
BarChartParm X=Type Y=_FREQUENCY_ / primary=true Group=Origin LegendLabel="Frequency" NAME="VBAR";
DiscreteLegend "VBAR"/ title="Origin";
endlayout;
endgraph;
end;
run;
Also check the doc for the BEGINGRAPH statement
Bruno
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.