BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
BobHope
Quartz | Level 8

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.

Here http://support.sas.com/documentation/cdl/en/odsug/67921/HTML/default/viewer.htm#p0kroq43yu0lspn16hk1...

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!

1 ACCEPTED SOLUTION

Accepted Solutions
BrunoMueller
SAS Super FREQ

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

View solution in original post

1 REPLY 1
BrunoMueller
SAS Super FREQ

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 931 views
  • 0 likes
  • 2 in conversation