Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9213133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:40:42+00:00 2026-06-18T01:40:42+00:00

Anyone have hints for getting clean PDF output from PROC SGPLOT (and similar functions

  • 0

Anyone have hints for getting clean PDF output from PROC SGPLOT (and similar functions like SGSCATTER)?

When I create a graph and write it to a PDF with ODS, the result looks fine in the sas EG report window but the PDF output gets rasterized to the DPI setting of the PDF so if you zoom into the PDF you can make out pixelation. Additionally, if I don’t define colors/line styles, the output in the PDF will use different colors and styles (lines that were solid in the sas report window become dashed in the PDF).

If I make the same chart with PROC GPLOT, it comes with vectorized text and lines that don’t look like junk when zoomed/printed.

Is there an option I need to change? Some flag I need to set? I’ve tried things like OPTIONS DEVICE=SVG and it doesn’t seem to work. Setting a really high DPI isn’t a very good solution either.

Code Example (but really, this happens on all of the SG* functions with any data/code):

options nonumber orientation=landscape;
ods pdf file='FILENAME.pdf' notoc;

proc sgplot data=shipped;
  series x=date y=weighted_price / group=type;
run;

proc gplot data=shipped;
  plot weighted_price*date=type;

symbol1   c=blue      i=join v=none w=1 l=1;
symbol2   c=red       i=join v=none w=1 l=1;
symbol3   c=brown     i=join v=none w=1 l=1;
run; ods pdf close;

These produce roughly equivalent graphs in the sas EG results window (except the SGPLOT looks nicer) but when they end up in the pdf, the SGPLOT is rasterized to an image and dropped onto the PDF page while the GPLOT comes out as a lovely vector chart.

EDIT: See solutions I posted below. I didn’t find it to be well documented, but SAS 9.2 did not have very good PDF support. There are a couple of workarounds that are ok for a 1-off chart, but the best solution is to just upgrade to SAS 9.3.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:40:43+00:00Added an answer on June 18, 2026 at 1:40 am

    I have finally solved this. There are a few ways that sort of work, and one way that really works.

    The “perfect” solution is upgrading to SAS 9.3; SAS 9.2 can’t make the SGPLOT/SGPANEL charts into a vectored PDF. Running the same code in SAS 9.3 produces perfect looking charts.

    I found two other partial solutions:

    1: In enterprise guide, you can tweak the display settings and if you get everything right, you can print the SAS Report window and use an Adobe PDF printer. This works ok although the output sometimes looks very un-sas.

    2: ods latex file='file.tex' gout='/.../'; (set gout= to your output directory). This produces, in unix 9.2 at least, a garbage TeX file that has no line breaks and doesn’t seem to actually reference the charts. It also produces a PostScript file for every chart! You can use this .ps file with Distiller (or TeX) to create decent looking vector charts. They print nicely, although I found the SAS 9.3 PDF to look far better on screen than the .ps from this method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anyone have any experience yet getting Radiant CMS extensions to actually make it onto
I have a PHP array like so (comes from a MySQL database, YouTube is
I have tried to google for hints on this problem but haven't found anyone
Anyone have any idea why my jQuery carousel is working fine at the bottom
Anyone have a good reference for how to do a multivariate ordinary linear regression
Anyone have an example snippet showing how to scale a Font using AffineTransform? Thanks.
Anyone have any ideas what I can do? Please reserve commenting about using 1.1
Anyone have any idea how to connect to their FTP server? I am using
Anyone have GWT 1.6.4 running on FreeBSD? Our build server is a FreeBSD box,
Anyone have any ideas on a good way to model the following scenario in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.