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.