Hi! I am preparing a paper for publication. I would like to create as good graphs as possible.
Now I use PROC SGPLOT on SAS Linux server (SAS on demand for Academics).
Are there any good tips or tricks go get better /sharper pictures?
The pictures are now 640 times 480 pixels.
(Well, they are not bad, but..)
How can I get "more pixels"?
Next question: Is ODS GRAPHICS better ?
I know the differences and the Pro, Con very littel.
(I am an old SAS user. But NOT very good with SAS graph.)
MANY THANKS, in Advance!
/Br Anders
This might help: https://communities.sas.com/t5/Graphics-Programming/ODS-PDF-why-is-my-text-sometimes-pixelated/m-p/8...
Also, if you want larger (in pixels) plots, you can use something like this:
ods graphics/height=1200px width=1600px;
This might help: https://communities.sas.com/t5/Graphics-Programming/ODS-PDF-why-is-my-text-sometimes-pixelated/m-p/8...
Also, if you want larger (in pixels) plots, you can use something like this:
ods graphics/height=1200px width=1600px;
Is ODS Graphics better than what? PROC SGPLOT is part of ODS Graphics. ODS Graphics is better than the old legacy SAS/GRAPH. You can get my free introductory book here. https://support.sas.com/documentation/prod-p/grstat/9.4/en/PDF/odsbasicg.pdf
Hi! MANY VERY GOOD answers! Many thanks! /Br Anders
/*The best choice is vector graph (not any loss quality) .*/
ods listing gpath='c:\temp' ;
ods graphics /width=640px height=480px imagename='want' outputfmt=svg;
proc sgplot data=sashelp.class;
scatter x=weight y=height/group=sex datalabel=name;
run;
Hi! MANY Thanks! Here is a report of what was good, and half-good:
ODS GRAPHICS / outputfmt= SVG imagename= "New SVG Plot;
ODS LISTING GPATH= "/home/anders.skollermo";
In SAS Studio I can see that the picture as a file, but not its contents. I can download it, and watch it. OK GOOD.
Slight protest: WARNING: RTF destination does not support SVG images. Using the default static format.
But (using Notepad): <svg xmlns="http://www.w3.org/2000/svg" - so it is a SVG file.
xxxxxxxxxx
ODS GRAPHICS / height= 480px width= 640px ; SAS Studio does not allow for BIG values.
width has a max value 745,44 - However the picturte does NOT look good. Title etc. are bad.
Again! Many thanks! / I hope this may be useful. /Br Anders
Since you are using SAS Studio, you might want to go under Options -> Preferences ->Results and and check "Generate HTML Graphs as SVG" instead of setting OUTPUTFMT=SVG on the ODS GRAPHICS statement. That will set up the "preamble" code generated by SAS Studio to use SVG output instead of you having to override that setting via the ODS GRAPHICS statement.
VERY GOOD answer. Yes! now I can see the nice picture in SAS studio. /Br Anders
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.