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

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
Rhodochrosite | Level 12

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
Pyrite | Level 9
Many thanks! Not easy to see what works in SAS Studio.
Anders Sköllermo (Skollermo in English)
AndersS
Pyrite | Level 9

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
Pyrite | Level 9

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
Pyrite | Level 9

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

Anders Sköllermo (Skollermo in English)

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 8 replies
  • 853 views
  • 8 likes
  • 5 in conversation