<?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 How to create a Dot Plot with Categorical Y Axis  (Barbell Chart) in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-create-a-Dot-Plot-with-Categorical-Y-Axis-Barbell-Chart/m-p/588536#M13037</link>
    <description>&lt;P&gt;I am trying to create a Dot Plot to show comparisons from a pre-test to a post-test.&amp;nbsp; Similar to what I copied below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to have a categorical Y axis, and a numeric X axis, with two dots showing the values for the pre- and post-test for each category.&amp;nbsp; Ideally they could be connected with a line in between.&amp;nbsp; It would also be ideal to include data labels for each dot, either inside the dot or to the left/right.&amp;nbsp; These are easy to do in R and Tableau, and can be made with some wrangelling in Excel/Powerpoint, but I have not been able to find a way to create what I want in Visual Analytics.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried creating this using the graph builder in SAS VA 8.3 on VIYA by combining different chart types, but have not had any luck getting what I want.&amp;nbsp; Both the Dot Plot chart and the Vector Chart require you to have a numeric Y axis.&amp;nbsp; I can't seem to get them to communicate with a chart that has a Categorical Y axis.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas would be great!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://r-statistics.co/screenshots/ggplot_masterlist_18.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://r-statistics.co/Top50-Ggplot2-Visualizations-MasterList-R-Code.html#Bubble%20Plot" target="_blank"&gt;http://r-statistics.co/Top50-Ggplot2-Visualizations-MasterList-R-Code.html#Bubble%20Plot&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Sep 2019 14:25:10 GMT</pubDate>
    <dc:creator>mhoolsema</dc:creator>
    <dc:date>2019-09-13T14:25:10Z</dc:date>
    <item>
      <title>How to create a Dot Plot with Categorical Y Axis  (Barbell Chart)</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-create-a-Dot-Plot-with-Categorical-Y-Axis-Barbell-Chart/m-p/588536#M13037</link>
      <description>&lt;P&gt;I am trying to create a Dot Plot to show comparisons from a pre-test to a post-test.&amp;nbsp; Similar to what I copied below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to have a categorical Y axis, and a numeric X axis, with two dots showing the values for the pre- and post-test for each category.&amp;nbsp; Ideally they could be connected with a line in between.&amp;nbsp; It would also be ideal to include data labels for each dot, either inside the dot or to the left/right.&amp;nbsp; These are easy to do in R and Tableau, and can be made with some wrangelling in Excel/Powerpoint, but I have not been able to find a way to create what I want in Visual Analytics.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried creating this using the graph builder in SAS VA 8.3 on VIYA by combining different chart types, but have not had any luck getting what I want.&amp;nbsp; Both the Dot Plot chart and the Vector Chart require you to have a numeric Y axis.&amp;nbsp; I can't seem to get them to communicate with a chart that has a Categorical Y axis.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas would be great!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://r-statistics.co/screenshots/ggplot_masterlist_18.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://r-statistics.co/Top50-Ggplot2-Visualizations-MasterList-R-Code.html#Bubble%20Plot" target="_blank"&gt;http://r-statistics.co/Top50-Ggplot2-Visualizations-MasterList-R-Code.html#Bubble%20Plot&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2019 14:25:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-create-a-Dot-Plot-with-Categorical-Y-Axis-Barbell-Chart/m-p/588536#M13037</guid>
      <dc:creator>mhoolsema</dc:creator>
      <dc:date>2019-09-13T14:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Dot Plot with Categorical Y Axis  (Barbell Chart)</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-create-a-Dot-Plot-with-Categorical-Y-Axis-Barbell-Chart/m-p/592925#M13103</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try to create a custom graph:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add a schedule plot for the lines and set the start and end value as a measure. Set the bar width to a smaller value to get a 'line'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add two scatter plots with a shared categorical role and let one represent the min and the other the max value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course you need to prepare your data as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not able to share a example now, but give it a try.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Dennis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 05:54:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-create-a-Dot-Plot-with-Categorical-Y-Axis-Barbell-Chart/m-p/592925#M13103</guid>
      <dc:creator>DMenkveld</dc:creator>
      <dc:date>2019-10-01T05:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Dot Plot with Categorical Y Axis  (Barbell Chart)</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-create-a-Dot-Plot-with-Categorical-Y-Axis-Barbell-Chart/m-p/802507#M15897</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/59656"&gt;@mhoolsema&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Hope you are doing well,&lt;/P&gt;&lt;P&gt;Did you succeed in creating the chart in SAS? I know that flourish is easy to do, but I would like to do it via SAS.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 16:30:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-create-a-Dot-Plot-with-Categorical-Y-Axis-Barbell-Chart/m-p/802507#M15897</guid>
      <dc:creator>HermanoRocha</dc:creator>
      <dc:date>2022-03-16T16:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Dot Plot with Categorical Y Axis  (Barbell Chart)</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-create-a-Dot-Plot-with-Categorical-Y-Axis-Barbell-Chart/m-p/802666#M15898</link>
      <description>&lt;P&gt;it is how&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/143383"&gt;@DMenkveld&lt;/a&gt;&amp;nbsp;has proposed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Area","pct_2014","pct_2013"&lt;BR /&gt;"Houston",0.19,0.22&lt;BR /&gt;"Miami",0.19,0.24&lt;BR /&gt;"Dallas",0.18,0.21&lt;BR /&gt;"San Antonio",0.15,0.19&lt;BR /&gt;"Atlanta",0.15,0.18&lt;BR /&gt;"Los Angeles",0.14,0.2&lt;BR /&gt;"Tampa",0.14,0.17&lt;BR /&gt;"Riverside, Calif.",0.14,0.19&lt;BR /&gt;"Phoenix",0.13,0.17&lt;BR /&gt;"Charlotte",0.13,0.15&lt;BR /&gt;"San Diego",0.12,0.16&lt;BR /&gt;"All Metro Areas",0.11,0.14&lt;BR /&gt;"Chicago",0.11,0.14&lt;BR /&gt;"New York",0.1,0.12&lt;BR /&gt;"Denver",0.1,0.14&lt;BR /&gt;"Washington, D.C.",0.09,0.11&lt;BR /&gt;"Portland",0.09,0.13&lt;BR /&gt;"St. Louis",0.09,0.1&lt;BR /&gt;"Detroit",0.09,0.11&lt;BR /&gt;"Philadelphia",0.08,0.1&lt;BR /&gt;"Seattle",0.08,0.12&lt;BR /&gt;"San Francisco",0.08,0.11&lt;BR /&gt;"Baltimore",0.06,0.09&lt;BR /&gt;"Pittsburgh",0.06,0.07&lt;BR /&gt;"Minneapolis",0.06,0.08&lt;BR /&gt;"Boston",0.04,0.04&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
FILENAME REFFILE FILESRVC FOLDERPATH='/Public'  FILENAME='health.txt';

PROC IMPORT DATAFILE=REFFILE
	DBMS=DLM
	OUT=WORK.IMPORT;
delimiter=",";
	GETNAMES=YES;
RUN;

PROC CONTENTS DATA=WORK.IMPORT; RUN;

data mkt.hh(promote=yes);
set import;
format pct_2013 pct_2014 miny maxy;
miny=min(pct_2013, pct_2014);
maxy=max(pct_2013, pct_2014);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pic2.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69541i9A58C3703C258710/image-size/large?v=v2&amp;amp;px=999" role="button" title="pic2.png" alt="pic2.png" /&gt;&lt;/span&gt;&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="pic.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69539i663AF2332FC171DF/image-size/large?v=v2&amp;amp;px=999" role="button" title="pic.png" alt="pic.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 17:44:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-create-a-Dot-Plot-with-Categorical-Y-Axis-Barbell-Chart/m-p/802666#M15898</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2022-03-17T17:44:24Z</dc:date>
    </item>
  </channel>
</rss>

