<?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: How to create a &amp;quot;dumbbell&amp;quot; graph? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-create-a-quot-dumbbell-quot-graph/m-p/369593#M12795</link>
    <description>That worked - thank you!</description>
    <pubDate>Thu, 22 Jun 2017 17:07:31 GMT</pubDate>
    <dc:creator>knitistician</dc:creator>
    <dc:date>2017-06-22T17:07:31Z</dc:date>
    <item>
      <title>How to create a "dumbbell" graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-create-a-quot-dumbbell-quot-graph/m-p/369585#M12793</link>
      <description>&lt;P&gt;I'm trying to create a "dumbbell" graph in which lines for different y-values run horizontal and begin/end in large circles with numerical x-values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using SAS 9.4 and have tried 2 different types of graphical overlays - both have the issue that I can't figure out how to center the text in the "dumbbells" (circles) at the beginning and end of the lines. I'm including a pdf of the graphs I created (I'm not worried about colors, etc. at this point). Here is my code (slightly simplified):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;title1 'Attempt #1';&lt;/P&gt;&lt;P&gt;data sx;&lt;/P&gt;&lt;P&gt;input sx value lohi $;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1 50 lo&lt;/P&gt;&lt;P&gt;1 75 hi&lt;/P&gt;&lt;P&gt;2 10 lo&lt;/P&gt;&lt;P&gt;2 60 hi&lt;/P&gt;&lt;P&gt;3 2 &amp;nbsp;lo&lt;/P&gt;&lt;P&gt;3 30 hi&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=sx;&lt;/P&gt;&lt;P&gt;series x=value y=sx / group=sx;&lt;/P&gt;&lt;P&gt;scatter x=value y=sx / group=lohi markerattrs=(size=30) datalabelattrs=(color=black) datalabelpos=center;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;title1 'Attempt #2';&lt;/P&gt;&lt;P&gt;data sxlohi;&lt;/P&gt;&lt;P&gt;input sx lo hi;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1 50 75&lt;/P&gt;&lt;P&gt;2 10 60&lt;/P&gt;&lt;P&gt;3 2 &amp;nbsp;30&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=sxlohi;&lt;/P&gt;&lt;P&gt;scatter &amp;nbsp;x=lo y=sx / markerattrs=(size=30);&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;scatter &amp;nbsp;x=hi y=sx / markerattrs=(size=30);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;highlow y=sx low=lo high=hi / lowlabel=lo highlabel=hi;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there a simpler way to make "dumbbell" graphs? Or a way to tweak this code?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any thoughts would be appreciated! Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 16:39:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-create-a-quot-dumbbell-quot-graph/m-p/369585#M12793</guid>
      <dc:creator>knitistician</dc:creator>
      <dc:date>2017-06-22T16:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a "dumbbell" graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-create-a-quot-dumbbell-quot-graph/m-p/369590#M12794</link>
      <description>&lt;P&gt;See the example about halfway down the article &lt;A href="http://blogs.sas.com/content/iml/2016/01/06/weighted-mean-in-sas.html" target="_self"&gt;"Compute a weighted mean"&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;The example uses the BUBBLE statement for the circles (but scatter should work, too)&lt;/P&gt;
&lt;P&gt;and uses the TEXT statement with the STRIP option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 17:00:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-create-a-quot-dumbbell-quot-graph/m-p/369590#M12794</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-06-22T17:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a "dumbbell" graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-create-a-quot-dumbbell-quot-graph/m-p/369593#M12795</link>
      <description>That worked - thank you!</description>
      <pubDate>Thu, 22 Jun 2017 17:07:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-create-a-quot-dumbbell-quot-graph/m-p/369593#M12795</guid>
      <dc:creator>knitistician</dc:creator>
      <dc:date>2017-06-22T17:07:31Z</dc:date>
    </item>
  </channel>
</rss>

