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

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jay54
Meteorite | Level 14

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
fill bradiusmax=36
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;

View solution in original post

6 REPLIES 6
Jay54
Meteorite | Level 14

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
fill bradiusmax=36
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;

BenConner
Pyrite | Level 9

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

 

--Ben

DanH_sas
SAS Super FREQ

To get rid of the gradient legend:

 

proc sgplot data=test noautolegend;

DanH_sas
SAS Super FREQ

You will probably want to do this:

 

proc sgplot data=test nowall noborder;

xaxis display=none;

yaxis display=none;

.....

run;

BenConner
Pyrite | Level 9

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.  Smiley Happy  But I couldn't agree more on the thoughts of when and when not to use bubble charts.

 

--Ben

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 6 replies
  • 1308 views
  • 0 likes
  • 3 in conversation