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: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register 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
  • 6 replies
  • 1429 views
  • 0 likes
  • 3 in conversation