BookmarkSubscribeRSS Feed
DDT
Obsidian | Level 7 DDT
Obsidian | Level 7

The following attempt to create a PDF ODS plot using GTL reports (SAS 9.4M2 Win64):

 

NOTE: The graph will be rendered as an image due to the use of data skins.

 

SAS 9.4 online documentation provides a list of conditions (some specifically for 9.4M2) when "vector graphics image [the PDF default] cannot be generated". As far as I can tell, I've eliminated all features that prevent vector graphics, including the "data skins" mentioned in the NOTE.

 

At least two of the mentioned conditions, I may not fully understand, but I don't think I'm using either:

  • "graphs that contain outline marker characters"
  • "graphs that include a text plot that displays text with an outlined bounding box or text with a filled bounding-box background"

I'm not using a Scatterplot Outlined Marker Character.

And I'm not using a Textplot, with or without bounding box.

 

Any ideas?

 

Here's the code (a GTL approach based on Sanjay's Dec-2015 blog😞

 

/* Calculate summary stats, and concatenate onto heart data for GTL AxisTable */
proc sort data=sashelp.heart out=heart;
  by bp_status smoking_status;
run;

 

proc summary data=heart noprint;
  by bp_status smoking_status;
  var diastolic;
  output out=stats (drop=_type_ _freq_) mean=mean std=std;
run;

 

data heart;
  set sashelp.heart
stats ;
run;


proc template;
  define statgraph xalignedstats;
  dynamic _GRP _CAT _MEASURE _STAT1 _STAT2 ;

  begingraph / border=false dataskin=none;

    layout overlay / walldisplay=none ;

      boxplot x=_CAT y=_MEASURE / group=_GRP
                                  groupdisplay=cluster;

      innermargin / align=bottom ;
        axistable x=_CAT value=_GRP / class=_GRP classdisplay=cluster;
        axistable x=_CAT value=_STAT1 / class=_GRP classdisplay=cluster;
        axistable x=_CAT value=_STAT2 / class=_GRP classdisplay=cluster;
      endinnermargin;

    endlayout;

  endgraph;
  end;
run;

 

goptions reset=all;
ods graphics on / reset=all;

 

ODS PDF FILE='mypdf.pdf';

 

proc sgrender data=heart template=xalignedstats;
  dynamic
  _GRP ='bp_status'
  _CAT ='smoking_status'
  _MEASURE ='diastolic'
  _STAT1 ='mean'
  _STAT2 ='std'
  ;
run;

 

ODS PDF CLOSE;

2 REPLIES 2
Jay54
Meteorite | Level 14

I do not see this error with SAS 9.40M3.  I see you are using M2.

 

Also, you might try the split tick values.

    layout overlay / walldisplay=none xaxisopts=(discreteopts=(tickvaluefitpolicy=splitrotate));

 

 

DDT
Obsidian | Level 7 DDT
Obsidian | Level 7

Many thanks for confirming so quickly, Sanjay.

 

Preventing the drawing of text on the diagonal (tickvaluefitpolicy of splitrotate) does *not* prevent this NOTE for me with SAS9.4M2.

I also tried turning off plot features one-by-one, but didn't manage to suppress this NOTE.

 

So the reasons mount for me to press our IT department to release M3 to us 🙂

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 901 views
  • 0 likes
  • 2 in conversation