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:         Tue, 25 Mar 2008 16:33:50 +0100
Reply-To:     Andre Wielki <wielki@INED.FR>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Andre Wielki <wielki@INED.FR>
Subject:      Re: Labeling bubbles in proc gplot
Comments: To: niek1 <xdit301kn@GOOGLEMAIL.COM>
In-Reply-To:  <88226d3e-49ff-48e6-999e-715c8a2da10b@t54g2000hsg.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Finally i got some solution

the heaviest problem is the legend which appear to move and narrow the plot so that i first search around vaxis and haxis solution but never with a perfect solution so i offer you a solution derivaed from your start program as follow with EMPTY bubble so that you can see through! in your replay assembly

HTH Andre ps be carefull with the increment of names in the gseg so that your gereplay must start on a perfect gseg!

proc greplay tc=test nofs; tdef test1 des='One panel template' 1/llx=0 lly=0 ulx=0 uly=100 urx=100 ury=100 lrx=100 lry=0 color=blue 2/ llx=0 lly=0 ulx=0 uly=100 urx=100 ury=100 lrx=100 lry=0 color=blue ; template test1; list template; quit;

goptions reset=all vsize=18 cm hsize= 16 cm; goptions colors=(cx949494, cxf1701a, cxfbbc01, cx216f2c, cxc60000, cx80b387, cxdedfe0, cxffe8a6, cxffd26b, cxb3c4dc); legend1 mode=protect origin=(5 16.2)cm;* so no legend; SYMBOL1 V=dot I=none repeat=11 pointlabel=(position=top j=l "#ms_sect") ; proc gplot data=sasuser.stats; plot y*x=ms_sect / name='sector' legend=legend1 ; run; quit;

goptions reset=all vsize=18 cm hsize= 16 cm ; SYMBOL1 V=none I=none ;

proc gplot data=sasuser.stats; bubble y*x=bubble / name='bubble' BSCALE=AREA BSize=9 blabel; run;quit;

proc greplay igout=gseg gout=gseg_out tc=test nofs; template=test1; list template; treplay 1:sector 2:bubble ;

quit;

niek1 a écrit : > Hi, > is there anything simpler than this (see below)? > > I want to plot three numeric variables by using bubbles. Great. Works. > But... > > for exp. I want to graphically display the following information > > ms_sect x-var y-var Bubble > 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% > > In order to have the legend in the bubble plot I had to do all sorts > of exercises: > > > > /* Create a template*/ > > proc greplay tc=test nofs; > tdef test1 des='One panel template' > 1/llx=0 lly=0 > ulx=0 uly=100 > urx=100 ury=100 > lrx=100 lry=0 > color=blue > 2/ llx=0 lly=0 > ulx=0 uly=100 > urx=100 ury=100 > lrx=100 lry=0 > color=blue > ; > template test1; > list template; > quit; > > /* Defining my colors*/ > SYMBOL1 V=DOT C='#113388' I=none; > SYMBOL2 V=DOT C='#949494' I=none; > SYMBOL3 V=DOT C='#f1701a' I=none; > SYMBOL4 V=DOT C='#fbbc01' I=none; > SYMBOL5 V=DOT C='#216f2c' I=none; > SYMBOL6 V=DOT C='#c60000' I=none; > SYMBOL7 V=DOT C='#80b387' I=none; > SYMBOL8 V=DOT C='#dedfe0' I=none; > SYMBOL9 V=DOT C='#ffe8a6' I=none; > SYMBOL10 V=DOT C='#ffd26b' I=none; > SYMBOL11 V=DOT C='#b3c4dc' I=none; > > > LEGEND1 position=(TOP Left inside); > > proc gplot data=stats; > plot y.*x=ms_sect / name='sector' LEGEND=legend1; > bubble y.*x=bubble / name='bubble' BSCALE=AREA BSize=9 ; > run; > quit; > > > > proc greplay igout=gseg gout=gseg_out > tc=test nofs; > template=test1; > list template; > treplay 1:sector > 2:bubble > ; > > quit; > > 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)? > >

-- André WIELKI INED (Institut National d'Etudes Démographiques) Service Informatique 133 Boulevard Davout 75980 Paris Cedex 20 mél : wielki@ined.fr tél : 33 (0) 1 56 06 21 54


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