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;
Oh. That makes more sense. It is almost the same.
data anno;
drawspace = 'GraphPercent';
function = 'Rectangle';
cornerradius=0.1;
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;
What comes to mind is suppressing the border and redrawing it by using SG annotation.
data anno;
drawspace = 'WallPercent';
function = 'Rectangle';
cornerradius=0.1;
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;
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).
Oh. That makes more sense. It is almost the same.
data anno;
drawspace = 'GraphPercent';
function = 'Rectangle';
cornerradius=0.1;
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;
Thank you! It works!
SAS is headed back to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team.
Interested in speaking? Content from our attendees is one of the reasons that makes SAS Innovate such a special event!
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.