BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
AndersS
Lapis Lazuli | Level 10

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

Anders Sköllermo (Skollermo in English)
1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

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;
--
Paige Miller

View solution in original post

8 REPLIES 8
PaigeMiller
Diamond | Level 26

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;
--
Paige Miller
WarrenKuhfeld
Ammonite | Level 13

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

AndersS
Lapis Lazuli | Level 10
Many thanks! Not easy to see what works in SAS Studio.
Anders Sköllermo (Skollermo in English)
AndersS
Lapis Lazuli | Level 10

Hi! MANY VERY GOOD answers! Many thanks!  /Br Anders

Anders Sköllermo (Skollermo in English)
Ksharp
Super User
/*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;

Ksharp_0-1689594332004.png

 

AndersS
Lapis Lazuli | Level 10

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

Anders Sköllermo (Skollermo in English)
DanH_sas
SAS Super FREQ

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.

AndersS
Lapis Lazuli | Level 10

VERY GOOD answer. Yes!   now I can see the nice picture in SAS studio. /Br Anders

Anders Sköllermo (Skollermo in English)

SAS Innovate 2025: Register Now

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!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 8 replies
  • 1776 views
  • 8 likes
  • 5 in conversation