BookmarkSubscribeRSS Feed
Banker123
Calcite | Level 5

Hello,

 

im using ods rtf and ods pdf to output different kind of graphics. When im using proc sgplot i'm experiencing the problem that the graphic output looks fine in the rtf (opened with word) and the pdf (opened with pdf reader). But when im printing the rtf-file (pdf-print or "real" print to paper) the graphic looks very different (s. pictures). I think this is related to the pixel density but using different pixel densities (you can change it with an ods rtf option) did not change anything. This problem occurs only with sgplot and not with gplot.

rtf-file / pdf-file (opened with word / pdf reader)

Banker123_0-1599203697376.png

The same rtf-file printed to paper / pdf:

Banker123_1-1599203715884.png

 

4 REPLIES 4
Ksharp
Super User
Did you try
ods rtf dpi=300
ods pdf dpi=300
Banker123
Calcite | Level 5

Thanks for your reply.

Your solution works if i'm changing device from "SASEMF" to "PNG". The Problem is that with SASEMF (enhanced metafile format) the graphics look way better than with jpeg or png and 90% less disk space is required. So i really want to stick to EMF. It can't be a "EMF-Problem" because it works perfect with proc gplot (without "s"). It just doesn't work with proc sgplot.

ballardw
Super User

Show the code, include any ODS Graphics options you are using.

 

Note: if you create objects using pixels as the unit then you are asking for this to happen because pixel size varies by display and when going through an image file the results can be unpredictable at best.

Banker123
Calcite | Level 5

example code:

 

ods rtf file='test.rtf' ;

goptions device = SASEMF

keymap = UNIXMAP

hsize = 20 cm

vsize = 10 cm

ftitle = '<ttf> Arial'

 

;

proc sgplot data = test description="Test" uniform=scale;

xaxis values = (1 2 3 4 5 6 7);

yaxis label = "test" min = 0 integer;

y2axis label = "test" min = 0 max = 1;

needle x = xvalue y = yvalue1 / legendlabel = "test1"

lineattrs = (thickness = 6pt)

 

;

series x = xvalue y = yvalue2 / y2axis legendlabel = "test2"

lineattrs = (thickness = 0)

markers markerattrs = (symbol = diamondfilled)

 

;

series x = xvalue y = yvalue3 / y2axis

legendlabel = "test3"

lineattrs = (thickness = 3pt)

 

;

keylegend / noborder position = topleft across = 1;

run;

ods rtf Close;

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 4 replies
  • 617 views
  • 0 likes
  • 3 in conversation