Data visualization with SAS programming

Line thickness in destination RTF

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 8
Accepted Solution

Line thickness in destination RTF

Hi,

 

we have a problem with setting the line thickness of ODS graphics for destination RTF.

Using the following program we get figures with the correct thick lines for HEIGHT for destinations LISTING and PDF, but it is not possible to set the line thickness for destination RTF.

 

proc template;
   define statgraph test;
      begingraph;
         layout overlay;
            seriesplot x=AGE y=HEIGHT   / lineattrs=(thickness=10px color=purple pattern=20) ;
            seriesplot x=AGE y=WEIGHT   / lineattrs=(thickness=2px color=blue   pattern=1 )  ;
         endlayout;
      endgraph;
   end;
run;

ods graphics on / noborder reset=all width=16.5cm height=14.8cm imagename="Figure";

ods listing gpath="h:\weist" image_dpi=300;

ods pdf file="h:\weist\test1.pdf" style=listing; 
ods rtf file="h:\weist\test1.rtf" style=listing; 

proc sgrender data=sashelp.class template=test; 
run;

ods rtf close;
ods pdf close;

ods listing close;

ods graphics off;

 

 

Has anyone a suggestion what's the problem ?


Accepted Solutions
Solution
‎02-14-2017 10:57 AM
SAS Super FREQ
Posts: 862

Re: Line thickness in destination RTF

The default graphics output format for RTF is EMFPlus, which is a vector-based format. Currently, there are issues rendering wide dashed lines in that format. To work around this issue, you can set the OUTPUTFMT on the ODS GRAPHICS statement to PNG to have it rendered as an image embedded into the RTF document. Your lines will then appear at the expected width.

 

Hope this helps!

Dan

View solution in original post


All Replies
Solution
‎02-14-2017 10:57 AM
SAS Super FREQ
Posts: 862

Re: Line thickness in destination RTF

The default graphics output format for RTF is EMFPlus, which is a vector-based format. Currently, there are issues rendering wide dashed lines in that format. To work around this issue, you can set the OUTPUTFMT on the ODS GRAPHICS statement to PNG to have it rendered as an image embedded into the RTF document. Your lines will then appear at the expected width.

 

Hope this helps!

Dan

Occasional Contributor
Posts: 8

Re: Line thickness in destination RTF

Thank's very much. Now it works correct ! :-)

 

Best regards,

 

Gerd

Post a Question
Discussion Stats
  • 2 replies
  • 73 views
  • 0 likes
  • 2 in conversation