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

I am trying to get a tif file from a sgplot as a high resolution tif file for a publication.

But can't get it to work...

No matter what I set the dpi resolution to a get a file with 100 dpi - but size of file dramatically increases.

The tif file has to be 15 cm wide and have a resolution on at least  300 dpi

 

SAS throws a warning “WARNING: SASREPORT13 destination does not support TIFF images. Using the default static format.

 

Any suggestions

In this litte test example I using the good old sashelp.class

 

 

goptions reset=all ;
ods graphics on /
                          imagefmt=tiff
                         imagename="class_test"
                         width=15cm
                         noborder;

 

ods listing gpath= "c:\temp" image_dpi=300 ;

 

proc sgplot data=sashelp.class;
title;
scatter x=height y=weight;
quit;
run;

ods graphics off;
ods html close;

run;

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
Diamond | Level 26

Hi:
Are you using SAS Enterprise Guide? The message tells you that your TIF is not being used because the SASREPORT default output from EG is active and that SASREPORT destination used by EG does not support TIFF format. You could try turning that off with ODS _ALL_ CLOSE; before your job. Also, your ODS HTML CLOSE is unnecessary, since you do not show an opening ODS HTML statement.

When I change your code just a bit, as shown below, I get an output file created as a TIFF. And, if I look in Paint, I see that the image properties of 15cm and 300 dpi were correctly set.

image_properties.png

 

And here's the LOG in EG...note where I put my ods _ALL_ close; statement:

class_test_example_eg.png

 

cynthia

View solution in original post

4 REPLIES 4
RW9
Diamond | Level 26 RW9
Diamond | Level 26

300dpi sounds a bit high for a graph.  Anyways, there is another post about this:

https://communities.sas.com/t5/General-SAS-Programming/Help-to-make-300dpi-TIFF-ROC-graph/td-p/10084...

 

Not sure how helpful that is.  Sounds like a support ticket to me, yuo may have to post process the output and up res the graphics.

Cynthia_sas
Diamond | Level 26

Hi:
Are you using SAS Enterprise Guide? The message tells you that your TIF is not being used because the SASREPORT default output from EG is active and that SASREPORT destination used by EG does not support TIFF format. You could try turning that off with ODS _ALL_ CLOSE; before your job. Also, your ODS HTML CLOSE is unnecessary, since you do not show an opening ODS HTML statement.

When I change your code just a bit, as shown below, I get an output file created as a TIFF. And, if I look in Paint, I see that the image properties of 15cm and 300 dpi were correctly set.

image_properties.png

 

And here's the LOG in EG...note where I put my ods _ALL_ close; statement:

class_test_example_eg.png

 

cynthia

Claus_Stenberg_DK
Calcite | Level 5

Yes I'm using SAS EG, version 7.11

 

I addedd the ODS _ALL_CLOSE and got rid of the warning 🙂

 

However, when opening the file in Paint and looks at properties I get the same file size as you (6.75 MB) do but image width=42.01 cm and DPI=100.

 

From log:

 

23 GOPTIONS ACCESSIBLE;

24

25

26 ODS _ALL_ CLOSE;

27

28 goptions reset=all ;

29 ods graphics on /

30 imagefmt=tiff

31 imagename="class_test"

32 width=15cm

33 noborder;

34

35

36

37 ods listing gpath= "c:\temp" image_dpi=300 ;

38

39

40

41 proc sgplot data=sashelp.class;

42 title;

43 scatter x=height y=weight;

44 quit;

NOTE: PROCEDURE SGPLOT used (Total process time):

real time 0.31 seconds

cpu time 0.14 seconds

 

NOTE: Listing image output written to c:\temp\class_test1.tiff.

NOTE: There were 19 observations read from the data set SASHELP.CLASS.

45 run;

46

47 ods graphics off;

48

49 run;

 

 

 

 

 


properties.png
Cynthia_sas
Diamond | Level 26
Hi:
The only thing I can recommend is to delete all your older or previous files AND/OR change the name from class_test to something else. Notice how you told it to create class_test, but it actually created class_test1.tiff. Are you sure you are looking at the properties of the right file?

If you change to a new name and use the code and still get the wrong CM value, then your best resource is to open a track with Tech Support.

cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 7755 views
  • 0 likes
  • 3 in conversation