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;
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.
And here's the LOG in EG...note where I put my ods _ALL_ close; statement:
cynthia
300dpi sounds a bit high for a graph. Anyways, there is another post about this:
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.
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.
And here's the LOG in EG...note where I put my ods _ALL_ close; statement:
cynthia
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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: