<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sgplot Bubble Charts in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Sgplot-Bubble-Charts/m-p/118301#M4524</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;awesome! thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Jun 2013 18:53:14 GMT</pubDate>
    <dc:creator>cat123</dc:creator>
    <dc:date>2013-06-25T18:53:14Z</dc:date>
    <item>
      <title>Sgplot Bubble Charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sgplot-Bubble-Charts/m-p/118299#M4522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a couple questions and would really appreciate it if someone could help me out.&amp;nbsp; I'm creating a bubble chart in sgplot and have a x,y coordinates and a column for the bubble size.&amp;nbsp; I also have a title column and a column with the colors that I want the bubbles to be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Is there a way to define colors for specific bubbles?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Some of the data labels overlap, how do I prevent this from happening so they are readable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 16:29:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sgplot-Bubble-Charts/m-p/118299#M4522</guid>
      <dc:creator>cat123</dc:creator>
      <dc:date>2013-06-25T16:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sgplot Bubble Charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sgplot-Bubble-Charts/m-p/118300#M4523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With SAS 9.3, you can assign specific values to the bubbles using the DATTRMAP option in SGPLOT or the DiscreteAttrMap in GTL.&amp;nbsp; Create a Attr Map data set and specify the fill color (and other attributes if you want) for each group value.&amp;nbsp; In the data, set each bubble of same color to same value and use that as the GROUP option.&amp;nbsp; Here is an example:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Bubble.png" class="jive-image jiveImage" src="https://communities.sas.com/legacyfs/online/3779_Bubble.png" /&gt;&lt;BR /&gt;data attrmap;&lt;BR /&gt;&amp;nbsp; id='A'; value='M'; fillcolor='lightblue'; textcolor='blue'; output;&lt;BR /&gt;&amp;nbsp; id='A'; value='F'; fillcolor='pink'; textcolor='red'; output;&lt;BR /&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;ods graphics / reset width=4in height=3in imagename='Bubble';&lt;BR /&gt;proc sgplot data=sashelp.class dattrmap=attrmap;&lt;BR /&gt;&amp;nbsp; bubble x=height y=weight size=age / group=sex attrid=A lineattrs=(color=black);&lt;BR /&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bubble labels do not participate in data label collision avoidance.&amp;nbsp; However, you can use scatter overlay with just the data labels to show the labels, which will avoid collision.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="BubbleLabel.png" class="jive-image" src="https://communities.sas.com/legacyfs/online/3780_BubbleLabel.png" /&gt;&lt;/P&gt;&lt;P&gt;ods graphics / reset width=4in height=3in imagename='BubbleLabel';&lt;BR /&gt;proc sgplot data=sashelp.class dattrmap=attrmap;&lt;BR /&gt;&amp;nbsp; bubble x=height y=weight size=age / group=sex attrid=A lineattrs=(color=black) name='a';&lt;BR /&gt;&amp;nbsp; scatter x=height y=weight / group=sex datalabel=name markerattrs=(size=0) &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; datalabelattrs=(weight=bold) attrid=A;&lt;BR /&gt;&amp;nbsp; keylegend 'a' / location=inside position=bottomright;&lt;BR /&gt;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 16:55:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sgplot-Bubble-Charts/m-p/118300#M4523</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2013-06-25T16:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sgplot Bubble Charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sgplot-Bubble-Charts/m-p/118301#M4524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;awesome! thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 18:53:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sgplot-Bubble-Charts/m-p/118301#M4524</guid>
      <dc:creator>cat123</dc:creator>
      <dc:date>2013-06-25T18:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sgplot Bubble Charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sgplot-Bubble-Charts/m-p/118302#M4525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't seem to get the text colors to change.&amp;nbsp; They are still the default group color scheme. What am I doing wrong?&amp;nbsp; Also, is there a way to specify where the data labels go? I would like them on top of the bubble.&amp;nbsp; Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data attrmap;&lt;/P&gt;&lt;P&gt;length value $15 fillcolor $8 textcolor $8;&lt;/P&gt;&lt;P&gt;&amp;nbsp; id='A'; value='Brand'; fillcolor='cx673802'; textcolor='cx673802'; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; id='A'; value='Product'; fillcolor='cxff7200'; textcolor='cxff7200'; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; id='A'; value='Other'; fillcolor='cx92d050'; textcolor='cx92d050'; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ods graphics / reset width=8.36in height=4.58in imagename='BubbleLabel';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=work.graph_colors dattrmap=attrmap noautolegend;&lt;/P&gt;&lt;P&gt;&amp;nbsp; bubble x=spend y=ef size=amount/ group=color_code attrid=A&amp;nbsp; lineattrs=(color=white);&lt;/P&gt;&lt;P&gt;&amp;nbsp; scatter x=spend y=ef / group=color_code datalabel=color_code markerattrs=(size=0) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; datalabelattrs=(weight=bold size=9) attrid=A;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 18:27:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sgplot-Bubble-Charts/m-p/118302#M4525</guid>
      <dc:creator>cat123</dc:creator>
      <dc:date>2013-06-26T18:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sgplot Bubble Charts</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Sgplot-Bubble-Charts/m-p/118303#M4526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove the GROUP option on scatter plot to get default color labels.&amp;nbsp; Set DataLabelAttrs to specify label color. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember you are using scatter labels as an alternate for bubble labels for data collision avoidance.&amp;nbsp; You can always go back to bubble labels, and remove the scatterplot entirely to get bubble labels which should be in top right of the bubble.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want bubbles in the center of each bubble, you will need to use GTL:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc template;&lt;BR /&gt;&amp;nbsp; define statgraph bubble;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; begingraph;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layout overlay;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bubbleplot x=height y=weight size=age/ group=sex&amp;nbsp; name='a'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; datalabel=name datalabelposition=center datalabelattrs=(color=black weight=bold);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; discretelegend 'a';&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endlayout;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; endgraph;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sgrender data=sashelp.class template=bubble;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 18:45:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Sgplot-Bubble-Charts/m-p/118303#M4526</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2013-06-26T18:45:16Z</dc:date>
    </item>
  </channel>
</rss>

