How to make rounded corners for graph border?

Solved
Occasional Contributor
Posts: 16

How to make rounded corners for graph border?

I need to create a dot plot with border and the border must have rounded corners instead of regular corners. Could someone please help me with it? Thanks.

Here is my code:

PROC SGPLOT DATA = temp1 dattrmap=attrmap border;

Scatter Y=NAME X = MY1R/markerAttrs=(COLOR=purple size=6MM symbol=CIRCLEFILLED) datalabel=MY1R DATALABELATTRS=(size=9pt weight=bold COLOR=White) DATALABELPOS=CENTER transparency=0.1;

Scatter Y=NAME X = MY2R/markerAttrs=(COLOR=purple size=6MM symbol=CIRCLEFILLED) datalabel=MY2R DATALABELATTRS=(size=9pt weight=bold COLOR=White) DATALABELPOS=CENTER transparency=0.1;

XAXIS DISPLAY=(NOTICKS) label=' ';
YAXIS DISPLAY=(NOTICKS noline) LABEL = ' ' labelattrs=(color=White) valueattrs=(size=12pt Family=Arial color=black) GRID gridattrs=(color=WhiteSmoke) MINORGRIDATTRS=(color=green pattern=longdash thickness=2);

run;

Accepted Solutions
Solution
‎01-09-2018 09:36 AM
SAS Super FREQ
Posts: 496

Re: How to make rounded corners for graph border?

Oh.  That makes more sense.  It is almost the same.

``````data anno;
drawspace = 'GraphPercent';
function  = 'Rectangle';
linestyleelement='GraphAxisLines';
retain x1 y1 50  height width 100 heightunit widthunit 'Percent';
run;

ods graphics on / noborder;
proc sgplot data=sashelp.class sganno=anno;
reg y=weight x=height / group=sex;
run;

proc print; run;``````

All Replies
SAS Super FREQ
Posts: 496

Re: How to make rounded corners for graph border?

What comes to mind is suppressing the border and redrawing it by using SG annotation.

``````data anno;
drawspace = 'WallPercent';
function  = 'Rectangle';
linestyleelement='GraphAxisLines';
retain x1 y1 50  height width 100 heightunit widthunit 'Percent';
run;

ods html body='b.html';
proc sgplot data=sashelp.class sganno=anno noborder;
reg y=weight x=height / group=sex;
xaxis display=(noline);
yaxis display=(noline);
run;
ods html close;

proc print; run;``````
Occasional Contributor
Posts: 16

Re: How to make rounded corners for graph border?

Hi Warren,

Thanks for your reply, but this method rounded the corners of the inside border (I do not need any border for it), I would like to round the corners for the outside border (the yellow highlighted line in the pic).

Solution
‎01-09-2018 09:36 AM
SAS Super FREQ
Posts: 496

Re: How to make rounded corners for graph border?

Oh.  That makes more sense.  It is almost the same.

``````data anno;
drawspace = 'GraphPercent';
function  = 'Rectangle';
linestyleelement='GraphAxisLines';
retain x1 y1 50  height width 100 heightunit widthunit 'Percent';
run;

ods graphics on / noborder;
proc sgplot data=sashelp.class sganno=anno;
reg y=weight x=height / group=sex;
run;

proc print; run;``````
Occasional Contributor
Posts: 16