## removing axes in a bubble plot

Solved
Regular Contributor
Posts: 179

# removing axes in a bubble plot

Hi,

I'm experimenting with the bubble statement in sgplot to duplicate some code done in proc template.  I need to strip out all axes in the plot produced by:

data test;

x=1; y=2; size=68; output;

x=2; y=2; size=49; output;

x=3; y=2; size=77; output;

x=4; y=2; size=6 ; output;

x=1; y=1; size=70; output;

x=2; y=1; size=46; output;

x=3; y=1; size=73; output;

x=4; y=1; size=10; output;

run;

title;

ods html;

proc sgplot data=test;

bubble x=x y=y size=size/datalabel=size

colormodel=(red blue green brown)

colorresponse=x

fill

transparency=.5

datalabelpos=center

datalabelattrs=(color=black);

run;

Eventually I also want to make the overall bubble sizes a bit larger and the edges fade out.

Thanks!

--Ben

Accepted Solutions
Solution
‎06-03-2016 12:05 PM
SAS Super FREQ
Posts: 1,210

## Re: removing axes in a bubble plot

[ Edited ]

ods html;
ods graphics / reset width=6in height=2in noscale;
proc sgplot data=test noborder;
bubble x=x y=y size=size/datalabel=size
colormodel=(red blue green brown)
colorresponse=x
transparency=.5
datalabelpos=center
datalabelattrs=(color=black)
datalabelattrs=(size=9 weight=bold);
xaxis display=none;

There is no feature for edge fading.  You can use DataSkins to get other effects.
yaxis display=none;
run;

All Replies
Solution
‎06-03-2016 12:05 PM
SAS Super FREQ
Posts: 1,210

## Re: removing axes in a bubble plot

[ Edited ]

ods html;
ods graphics / reset width=6in height=2in noscale;
proc sgplot data=test noborder;
bubble x=x y=y size=size/datalabel=size
colormodel=(red blue green brown)
colorresponse=x
transparency=.5
datalabelpos=center
datalabelattrs=(color=black)
datalabelattrs=(size=9 weight=bold);
xaxis display=none;

There is no feature for edge fading.  You can use DataSkins to get other effects.
yaxis display=none;
run;

Regular Contributor
Posts: 179

## Re: removing axes in a bubble plot

Thanks, Sanjay!  Is there a way to lose the gradient bar on the right side?

--Ben

SAS Super FREQ
Posts: 975

## Re: removing axes in a bubble plot

To get rid of the gradient legend:

proc sgplot data=test noautolegend;

SAS Super FREQ
Posts: 975

## Re: removing axes in a bubble plot

You will probably want to do this:

proc sgplot data=test nowall noborder;

xaxis display=none;

yaxis display=none;

.....

run;

SAS Super FREQ
Posts: 1,210

## Re: removing axes in a bubble plot

Regular Contributor
Posts: 179

## Re: removing axes in a bubble plot

Hi Sanjay,

Thanks for the link and insight.  I had carefully avoided bringing up the choice of visual presentation as the client had chosen that and approved the representation.  So I was stuck.    But I couldn't agree more on the thoughts of when and when not to use bubble charts.

--Ben

🔒 This topic is solved and locked.