LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 26 Mar 2008 09:14:10 -0500
Reply-To:     "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Subject:      Re: Labeling bubbles in proc gplot
Comments: To: niek1 <xdit301kn@googlemail.com>
Content-Type: text/plain; charset="iso-8859-15"

niek1 wrote: > Hi, > is there anything simpler than this (see below)? > > I want to plot three numeric variables by using bubbles. Great. Works. > But... ... > In order to have the legend in the bubble plot I had to do all sorts > of exercises: ... > Ok, I have a result. But a few things are not very good: > > 1. Would be nice to fill the bubble with the color of each sector > (although it will be difficult to still see the dashed lines around > the "negative-sized" bubbles. > 2. Isn't there a simpler solution to label the bubbles (without all > this greplay)?

The BUBBLE2 statement will let you mix a PLOT and BUBBLE in a single run; BUBBLE has a great option BLABEL to automatically annotate the bubbles with the value of the third variable.

Later, you could use annotation function PIE to create filled circles if necessary.

------------------------- data stats; input ms_sect $ x y percent. Bubble percent.; datalines; CD 4.09 9.8% -3.7% CS 2.95 6.5% -0.3% EG 4.61 11.2% 2.6% FI 6.19 13.2% -4.4% HC 3.53 8.2% -5.4% ID 3.39 8.6% -4.7% IT 3.01 8.6% -6.1% MA 2.71 9.1% 2.8% TS 5.84 9.2% 0.5% UT 4.28 7.2% -2.1% run;

ods listing;

goptions reset=all ftext='Arial';

symbol1 v=dot;

goptions goutmode=replace;

proc gplot data=stats; plot y * x = ms_sect / name='sector' ;*LEGEND=legend1; bubble2 y * x = bubble / name='bubble' BSCALE=AREA BSize=9 bcolor=black blabel ; run ; quit;

goptions goutmode=append; -------------------------

-- Richard A. DeVenezia


Back to: Top of message | Previous page | Main SAS-L page