<?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 include individual point in bar chart? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944417#M47169</link>
    <description>&lt;P&gt;There is a section in the online help for Sgplot/ Sgpanel that has details on "Plot Type Compatibility". Search for it. Memorize it.&lt;/P&gt;
&lt;P&gt;The page shows which plots may be used with others.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you every wondered why there are HBAR/VBAR ad HBARPARM/VBARPARM this page might help. If you must overlay a SCATTER plot then you need to overlay with the HBARPARM or VBARPARM.&lt;/P&gt;
&lt;P&gt;The Parm bit means you have to pre-summarize the data to set the bar heights.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Sep 2024 13:58:21 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2024-09-18T13:58:21Z</dc:date>
    <item>
      <title>how to include individual point in bar chart?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944413#M47165</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;I created the plot below using the following code:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bhrq_0-1726666613776.png" style="width: 344px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100475i15A6B99543E01173/image-dimensions/344x258?v=v2" width="344" height="258" role="button" title="bhrq_0-1726666613776.png" alt="bhrq_0-1726666613776.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=tmp;
where event in ('b', 'w');
  vbar event / response=score  stat=mean limitstat=CLM  barwidth=0.3;  XAXIS DISPLAY=(nolabel); RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;when I try to add the following statement to include individual values:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;scatter x=event y=score /jitter markerattrs=(symbol=trianglefilled color=black size=8);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I receive the error:&lt;/P&gt;
&lt;P&gt;ERROR: Attempting to overlay incompatible plot or chart types.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;when I use the other way below it doesn't show me all the 20 obs that I have :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; proc summary data=plot1 nway;
   class event;
   var score;
   output out=work.summary (drop= _: )
      mean= lclm= uclm= / autoname;run;&lt;BR /&gt;
data work.newplot;
   set plot1   work.summary   ; run;&lt;BR /&gt;
proc sgplot data=work.newplot;
where event  in ('b',  'w' );
   vbarparm category= event response=score/ barwidth=0.3
      limitlower=score_lclm limitupper= score_uclm ;
   scatter x=event y=score/markerattrs=(color=gray size=6 symbol=trianglefilled) ;
   run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;it shows:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bhrq_0-1726671013785.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100477i2FFDF6F12FC1F42D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bhrq_0-1726671013785.png" alt="bhrq_0-1726671013785.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;there are 11 points in each plot, it should be 20 in each not 11, I meant didn't show me all the obs.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 17:05:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944413#M47165</guid>
      <dc:creator>bhr-q</dc:creator>
      <dc:date>2024-09-18T17:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to include individual point in bar chart?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944416#M47168</link>
      <description>&lt;P&gt;Scatter plot and vertical bar chart cannot be on the same plot, they must be on different plots. It's not really clear to me what you mean by "include individual point in bar chart".&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 13:59:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944416#M47168</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-09-18T13:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to include individual point in bar chart?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944417#M47169</link>
      <description>&lt;P&gt;There is a section in the online help for Sgplot/ Sgpanel that has details on "Plot Type Compatibility". Search for it. Memorize it.&lt;/P&gt;
&lt;P&gt;The page shows which plots may be used with others.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you every wondered why there are HBAR/VBAR ad HBARPARM/VBARPARM this page might help. If you must overlay a SCATTER plot then you need to overlay with the HBARPARM or VBARPARM.&lt;/P&gt;
&lt;P&gt;The Parm bit means you have to pre-summarize the data to set the bar heights.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 13:58:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944417#M47169</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-09-18T13:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to include individual point in bar chart?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944435#M47171</link>
      <description>&lt;P&gt;Thanks, I edited my question, including extra one to show individual point&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 15:10:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944435#M47171</guid>
      <dc:creator>bhr-q</dc:creator>
      <dc:date>2024-09-18T15:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to include individual point in bar chart?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944441#M47174</link>
      <description>&lt;P&gt;Data.&lt;/P&gt;
&lt;P&gt;What is the question now? We have no data so can't tell what you might mean by "there are around 14 points not 20". Are there supposed to be just 14? If there are more then which 14 are desired.&lt;/P&gt;
&lt;P&gt;Since I can count what appears to be 22 markers neither 14 not 20 make sense.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 15:13:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944441#M47174</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-09-18T15:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to include individual point in bar chart?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944446#M47175</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/465427"&gt;@bhr-q&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks, I edited my question, including extra one to show individual point&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I'm lost.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 15:21:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944446#M47175</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-09-18T15:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to include individual point in bar chart?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944447#M47176</link>
      <description>&lt;P&gt;I meant there should be 20 points for each plot, but here shows 11 points for each plot&lt;/P&gt;
&lt;P&gt;yes I&amp;nbsp; had typo error 11 not 14, sorry.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 15:22:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944447#M47176</guid>
      <dc:creator>bhr-q</dc:creator>
      <dc:date>2024-09-18T15:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to include individual point in bar chart?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944470#M47179</link>
      <description>&lt;P&gt;Data.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Data&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="5" color="#FF0000"&gt;Data&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4" color="#000000"&gt;How do you expect us to have any idea of what you want or describe what happens without actual data. in the form of a working data set.&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/465427"&gt;@bhr-q&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I meant there should be 20 points for each plot, but here shows 11 points for each plot&lt;/P&gt;
&lt;P&gt;yes I&amp;nbsp; had typo error 11 not 14, sorry.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you expect XXX number of points and only see YYY and YYY&amp;lt;XXX it almost always means that either 1) you have duplicate values and they are overlaying or 2) you don't actually have XXX points.&lt;/P&gt;
&lt;P&gt;If it is one of the above situations it can be answered very quickly by looking at the &lt;STRONG&gt;data.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 17:15:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944470#M47179</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-09-18T17:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to include individual point in bar chart?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944472#M47180</link>
      <description>&lt;P&gt;I didn't expect any one if my question is not clear.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 17:28:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944472#M47180</guid>
      <dc:creator>bhr-q</dc:creator>
      <dc:date>2024-09-18T17:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to include individual point in bar chart?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944479#M47181</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/465427"&gt;@bhr-q&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I didn't expect any one if my question is not clear.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Your question is extremely "not clear".&lt;/P&gt;
&lt;P&gt;You think you should have 20 points and only see 11.&lt;/P&gt;
&lt;P&gt;But you won't share the data so we can tell you exactly why you get 11.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Show us proc freq output for&lt;/P&gt;
&lt;PRE&gt;Proc freq data=tmp;
   where event in ('b', 'w');
   tables event * score / list missing;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Sep 2024 17:46:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944479#M47181</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-09-18T17:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to include individual point in bar chart?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944535#M47185</link>
      <description>Maybe you have some duplicated value in SCATTERS, add JITTER option in SCATTER statement:&lt;BR /&gt;scatter x=event y=score/markerattrs=(color=gray size=6 symbol=trianglefilled)   jitter  ;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Sep 2024 01:49:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944535#M47185</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-09-19T01:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to include individual point in bar chart?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944551#M47187</link>
      <description>&lt;P&gt;Thanks so much. I was able to get the answer with your help. Now I have the right plot, 19 points for each plot would be correct. The important thing is that the initial plot showed me a much lower point than I expected; it doesn't matter is it 19 or is it 20, because I have several datasets, and one of them is 19&amp;nbsp; which shows here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; my aim was to figure out why show me a much lower point in my second approach&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bhrq_0-1726716551333.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100504i788F7B9BEC45F99A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bhrq_0-1726716551333.png" alt="bhrq_0-1726716551333.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had two approaches in my initial comments:&lt;/P&gt;
&lt;P&gt;In my &amp;nbsp;first way:&amp;nbsp;&amp;nbsp;&amp;nbsp; I tried using the jitter option with a scatter statement alongside a vertical bar chart. but, I received &amp;nbsp;an error stating 'overlay incompatible plot,' .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my second approach, I missed to include the jitter option, which resolved the issue, so it would be enough to include “markerattrs=(color=gray size=&lt;STRONG&gt;6&lt;/STRONG&gt; symbol=trianglefilled)jitter” as a last line in my second approach&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 04:41:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944551#M47187</guid>
      <dc:creator>bhr-q</dc:creator>
      <dc:date>2024-09-19T04:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to include individual point in bar chart?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944554#M47188</link>
      <description>&lt;P&gt;Thanks again, I also tried to remove the redcap_event_name in the below of my plot, I looked for legend but didn't do.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 04:03:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-include-individual-point-in-bar-chart/m-p/944554#M47188</guid>
      <dc:creator>bhr-q</dc:creator>
      <dc:date>2024-09-19T04:03:47Z</dc:date>
    </item>
  </channel>
</rss>

