BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
PaigeMiller
Diamond | Level 26

I create some plots yesterday using ODS PDF and the exact same program as today using ODS LAYOUT GRIDDED and PROC SGPLOT. Yesterday's output to ODS PDF provided sharp clear text; today's output has pixelated text. Why does this happen if the code doesn't change? The code is what I provided here. (If your question is why would I run code on SASHELP.CLASS on two different days ... I actually did this on real data where I wanted updated data and saw pixelated text, but then I re-ran it on SASHELP.CLASS and the problem also appears to happen running the code on SASHELP.CLASS today)

 

Here are examples. The first plot is the sharp clear text from yesterday's run, the second is the pixelated text from today's run. (The output is copied from Acrobat Reader, where the magnification in both cases is 100%) I have also attached the actual PDF files, test1.pdf is yesterday's run which is not pixelated; test2.pdf is the new run which is pixelated.

 

 

PaigeMiller_4-1667913937189.png

 

PaigeMiller_3-1667913900882.png

 

 

--
Paige Miller
1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

Thanks, @DanH_sas 

 

ods graphics / outputfmt=svg;

 

didn't work but this does:

 

ods graphics / outputfmt=pdf;

 

Any idea why this might have changed? Is it dependent on some other option perhaps? I can say with 100% certainty that I have never used the outputfmt= option in the 27.4326 bazillion lines of SAS code that I have written in my life (I never even heard of this option before).

 

Anyway, problem solved!

--
Paige Miller

View solution in original post

12 REPLIES 12
GraphGuy
Meteorite | Level 14

How are  you running the SAS job? (batch sas, dms sas, enterprise guide, sas studio, viya, etc)

 

Are you leaving the same SAS session up overnight, and running both versions in the same SAS session? Or are you opening a new/fresh SAS session on the 2nd day?

 

PaigeMiller
Diamond | Level 26

I run it in the SAS display manager. The second one was run in a new SAS session — in fact, I realized this after I posted, although I'm not sure why it might make a difference, my company's IT dept forced a reboot of my PC this morning before I came in to work, to do whatever system updates were required.

--
Paige Miller
ballardw
Super User

FWIW, neither the posted images nor the PDF documents appear pixelated when I view them. Not saying it isn't happening but it may point to individual computer settings and versions of viewing applications.

PaigeMiller
Diamond | Level 26

@ballardw wrote:

FWIW, neither the posted images nor the PDF documents appear pixelated when I view them. Not saying it isn't happening but it may point to individual computer settings and versions of viewing applications.


Can't rule that out ... these things can be tricky to track down, and most definitely could be caused by something other than SAS.

--
Paige Miller
PaigeMiller
Diamond | Level 26

Here is the same two files, blown up to 400% using Adobe Acrobat, so you can clearly see the pixelization if you click on each image to see them full size here in the SAS Communities.

 

First attempt (no pixelization)

PaigeMiller_0-1667922125293.png

 

Second attempt (pixelization)

PaigeMiller_1-1667922152193.png

 

--
Paige Miller
DanH_sas
SAS Super FREQ

To me, it appears that the first output was generated using vector-based PDF, and the second graph was generated as an image in the PDF (vector-based is the default). I'm not sure if something in your environment is changing the OUTPUTFMT in your program runs, but you can force vector-based output using by setting the OUTPUTFMT to SVG:

 

ods graphics / outputfmt=svg;

PaigeMiller
Diamond | Level 26

Thanks, @DanH_sas 

 

ods graphics / outputfmt=svg;

 

didn't work but this does:

 

ods graphics / outputfmt=pdf;

 

Any idea why this might have changed? Is it dependent on some other option perhaps? I can say with 100% certainty that I have never used the outputfmt= option in the 27.4326 bazillion lines of SAS code that I have written in my life (I never even heard of this option before).

 

Anyway, problem solved!

--
Paige Miller
DanH_sas
SAS Super FREQ

Again, it could be something in your environment that is changing the OUTPUTFMT explicitly. It could be anything from an autoexec to a sneaky ODS GRAPHICS line buried in some code you ran 🙂

PaigeMiller
Diamond | Level 26

I'm pretty sure nothing changed in my AUTOEXEC. The only ODS GRAPHICS code I used in this code is 

 

ods graphics/height=3in width=4in;
--
Paige Miller
DanH_sas
SAS Super FREQ

How do you run SAS (e.g DMS, SAS Studio, Enterprise Guide, batch, etc)?

PaigeMiller
Diamond | Level 26

Display manager

--
Paige Miller
DanH_sas
SAS Super FREQ

Hmmm... then I'm not sure where to look. There is no auto-generated code in the this case that would affect your program.

SAS Innovate 2025: Call for Content

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 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 12 replies
  • 2294 views
  • 4 likes
  • 4 in conversation