<?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: Bubble Plot Legend in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Bubble-Plot-Legend/m-p/605178#M19124</link>
    <description>&lt;P&gt;Awesome!&amp;nbsp; Thanks a lot!&lt;/P&gt;</description>
    <pubDate>Mon, 18 Nov 2019 19:46:59 GMT</pubDate>
    <dc:creator>Relax</dc:creator>
    <dc:date>2019-11-18T19:46:59Z</dc:date>
    <item>
      <title>Bubble Plot Legend</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Bubble-Plot-Legend/m-p/605094#M19120</link>
      <description>&lt;P&gt;Hello SAS Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If someone can tell me how to have such a legend in the red square below (picture 2) in the bubble plot?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Size is a continuous variable, 7.80 and 18.01 are its minimum and maximum respectively.&amp;nbsp; I created a new category variable named SizeBucket based on size.&lt;/P&gt;&lt;P&gt;Right now what I have is picture 1 and I would like to have a result like picture 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Relax&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="picture 1.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34063iB30B05E02CD862B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="picture 1.PNG" alt="picture 1.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="picture 2.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34062i94D360BC10C764C4/image-size/large?v=v2&amp;amp;px=999" role="button" title="picture 2.PNG" alt="picture 2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 16:36:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Bubble-Plot-Legend/m-p/605094#M19120</guid>
      <dc:creator>Relax</dc:creator>
      <dc:date>2019-11-18T16:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Bubble Plot Legend</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Bubble-Plot-Legend/m-p/605109#M19121</link>
      <description>Is this using SAS VA? If so, I can move this post to that forum specifically.</description>
      <pubDate>Mon, 18 Nov 2019 17:07:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Bubble-Plot-Legend/m-p/605109#M19121</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-11-18T17:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Bubble Plot Legend</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Bubble-Plot-Legend/m-p/605113#M19122</link>
      <description>&lt;P&gt;The picture 2 was created using SAS VA, but I was trying to create a same plot in the SAS EG (picture 1):smileyhappy:&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 17:17:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Bubble-Plot-Legend/m-p/605113#M19122</guid>
      <dc:creator>Relax</dc:creator>
      <dc:date>2019-11-18T17:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: Bubble Plot Legend</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Bubble-Plot-Legend/m-p/605175#M19123</link>
      <description>&lt;P&gt;Currently, I believe the only way to get a size legend with sgplot bubble is to annotate it, and unfortunately that takes a bit of code.&lt;/P&gt;
&lt;P&gt;Here's an example, you might be able to re-use ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data my_data; set sashelp.cars (where=(origin='Europe' and make in ('Porsche' 'Volvo')));&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql noprint;&lt;BR /&gt;select min(msrp) format=dollar10.0 into :minmsrp separated by ' ' from my_data;&lt;BR /&gt;select max(msrp) format=dollar10.0 into :maxmsrp separated by ' ' from my_data;&lt;BR /&gt;quit; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data anno_bubble_legend;&lt;BR /&gt;length function x1space y1space display fillcolor linecolor textcolor anchor $50;&lt;/P&gt;
&lt;P&gt;x1space='graphpercent'; y1space='graphpercent';&lt;/P&gt;
&lt;P&gt;function='oval'; display='fill'; fillcolor='grayce';;&lt;BR /&gt;x1=13.5; y1=71.5; anchor='bottom';&lt;BR /&gt;height=45; width=45;&lt;BR /&gt;heightunit='pixel'; widthunit='pixel';&lt;BR /&gt;output;&lt;/P&gt;
&lt;P&gt;function='oval'; display='outline'; linecolor='white';&lt;BR /&gt;x1=13.5; y1=71.5; anchor='bottom';&lt;BR /&gt;height=15; width=15;&lt;BR /&gt;heightunit='pixel'; widthunit='pixel';&lt;BR /&gt;output;&lt;/P&gt;
&lt;P&gt;function='text'; anchor='right'; fillcolor=''; textcolor='gray33';&lt;BR /&gt;width=100; widthunit='percent';&lt;BR /&gt;x1=8.3; y1=78; label="&amp;amp;maxmsrp"; output;&lt;BR /&gt;x1=8.3; y1=73; label="&amp;amp;minmsrp"; output;&lt;/P&gt;
&lt;P&gt;function='line'; linecolor='grayaa';&lt;BR /&gt;x1space='graphpercent'; y1space='graphpercent';&lt;BR /&gt;x2space='graphpercent'; y2space='graphpercent';&lt;BR /&gt;x1=8.3; y1=78; x2=x1+2; y2=y1; output;&lt;BR /&gt;x1=8.3; y1=73; x2=x1+3.7; y2=y1; output;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;title 'Comparing Horsepower and MSRP for European Made Cars';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods graphics / width=800px height=600px noborder;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgplot data=my_data pad=(left=15pct) sganno=anno_bubble_legend;&lt;BR /&gt;bubble x=make y=horsepower size=msrp / group=drivetrain;&lt;BR /&gt;xaxis offsetmin=.2 offsetmax=.2;&lt;BR /&gt;yaxis labelpos=top;&lt;BR /&gt;keylegend / position=left;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anno_legend.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/34067i16CEAC3C7DCBCF21/image-size/large?v=v2&amp;amp;px=999" role="button" title="anno_legend.png" alt="anno_legend.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 13:03:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Bubble-Plot-Legend/m-p/605175#M19123</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2019-11-19T13:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Bubble Plot Legend</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Bubble-Plot-Legend/m-p/605178#M19124</link>
      <description>&lt;P&gt;Awesome!&amp;nbsp; Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 19:46:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Bubble-Plot-Legend/m-p/605178#M19124</guid>
      <dc:creator>Relax</dc:creator>
      <dc:date>2019-11-18T19:46:59Z</dc:date>
    </item>
  </channel>
</rss>

