BookmarkSubscribeRSS Feed
dmauger
New User | Level 1

edit: apologies.  first time user not aware there is a separate graphics forum.  if mods can move, please do.

 

hi

 

The following 2 pieces of code produce very different graphs even though the line thickness is 1.9px in the first and 2.0px in the second.  It doesn't matter whether I use pt or px as the units (it just breaks at a different point). 

 

If i create a png image instead of svg, it behaves exactly as expected.  If I leave out the image_dpi option it behaves as expected.  Using a lower dpi reduces the problem while higher dpi makes the problem even worse.

 

I require an svg file with at least 600dpi and I’d like to get an image with a line thickness somewhere between ultra-fine and pre-school crayola.  

 

 

CODE 1:

ods html close;
ods html5 options(svg_mode="embed") image_dpi=600;
ods graphics /imagefmt=svg;
proc sgplot data=_plot noautolegend;
step x=time y=Survival / group=Stratum lineattrs=(thickness=1.9px);
scatter x=time y=Censored / group=Stratum markerattrs=(symbol=plus size=8);
run;
ods html5 close;
ods html;

 

 

 

CODE2:

ods html close;
ods html5 options(svg_mode="embed") image_dpi=600;
ods graphics /imagefmt=svg;
proc sgplot data=_plot noautolegend;
step x=time y=Survival / group=Stratum lineattrs=(thickness=2px);
scatter x=time y=Censored / group=Stratum markerattrs=(symbol=plus size=8);
run;
ods html5 close;
ods html;

 

 

Capture.jpg

 

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand in the Innovate Hub.

Watch 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
  • 0 replies
  • 50 views
  • 0 likes
  • 1 in conversation