<?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: Standard Error Bars on a Histogram? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Standard-Error-Bars-on-a-Histogram/m-p/895160#M24113</link>
    <description>&lt;P&gt;You'll want to use the VBARPARM statement instead of the VBAR statement to put your own limit variables on the bar chart. The VBAR statement can display only the limits it calculates (CLM, STDERR, STDDEV), whereas you can specify your own custom LIMITUPPER/LIMITLOWER with the VBARPARM statement.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Sep 2023 02:30:11 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2023-09-21T02:30:11Z</dc:date>
    <item>
      <title>Standard Error Bars on a Histogram?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Standard-Error-Bars-on-a-Histogram/m-p/895156#M24112</link>
      <description>&lt;P&gt;Somebody wants standard error bars added to a histogram.&amp;nbsp; I am hoping just to modify my PROC SGPLOT to add.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought it would be simple -- just add yerrorlower= yerrorupper = after the slash on the VBAR statement.&amp;nbsp; But apparently VBAR doesn't like those.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I tried a separate SCATTER statement with the error bars.&amp;nbsp; But again, I got this red error message:&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;So, can I do a histogram with these bars?&amp;nbsp; I see pictures of them, so I know the idea isn't insane:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="davehalltwp_0-1695256749384.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88185iD83A39E416DDC431/image-size/medium?v=v2&amp;amp;px=400" role="button" title="davehalltwp_0-1695256749384.png" alt="davehalltwp_0-1695256749384.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&amp;nbsp; Thank you.&amp;nbsp; Here is my code (with the failed SCATTER statement left in. prior to that I tried yerrorlower= yerrowupper= after the slash on the VBAR statement).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sgplot data = adcv4 noautolegend;
     where paramcd = 'LVMASSIX';
     vbar tx / group = tx 
               datalabel = txtext 
               datalabelpos=top
               datalabelattrs = (color=black family="courier new" size=11 weight=bold) 
               filltype=solid outlineattrs=(color='black') response=meanchg;

scatter x=tx y=meanchg / yerrorlower=lower                                                                                            
                           yerrorupper=upper;

     styleattrs datacolors=(viypk vligb);
     xaxis label = '   ' 
	       display = (noticks novalues)
           offsetmin = .3 offsetmax = .3;
     yaxis label = 'Mean Percent'
	       labelattrs    = (family = "courier new" size = 10 pt color = black weight = bold)
           values = (-2 to 8 by 2);
     run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 00:41:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Standard-Error-Bars-on-a-Histogram/m-p/895156#M24112</guid>
      <dc:creator>davehalltwp</dc:creator>
      <dc:date>2023-09-21T00:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Standard Error Bars on a Histogram?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Standard-Error-Bars-on-a-Histogram/m-p/895160#M24113</link>
      <description>&lt;P&gt;You'll want to use the VBARPARM statement instead of the VBAR statement to put your own limit variables on the bar chart. The VBAR statement can display only the limits it calculates (CLM, STDERR, STDDEV), whereas you can specify your own custom LIMITUPPER/LIMITLOWER with the VBARPARM statement.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 02:30:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Standard-Error-Bars-on-a-Histogram/m-p/895160#M24113</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2023-09-21T02:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Standard Error Bars on a Histogram?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Standard-Error-Bars-on-a-Histogram/m-p/895161#M24114</link>
      <description>&lt;P&gt;Because of internal reasons some plots are not compatible with others. If you want to overlay a Scatter plot on vertical bar chart then use VBARBASIC instead of Vbar.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 02:34:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Standard-Error-Bars-on-a-Histogram/m-p/895161#M24114</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-09-21T02:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: Standard Error Bars on a Histogram?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Standard-Error-Bars-on-a-Histogram/m-p/895203#M24115</link>
      <description>&lt;P&gt;See the section "Bar charts for pre-summarized data" in the article &lt;A href="https://blogs.sas.com/content/iml/2011/10/07/creating-bar-charts-with-confidence-intervals.html" target="_self"&gt;"Creating bar charts with confidence intervals."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;See also the end of the article, which suggests using a dot plot or scatter plot instead.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 10:19:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Standard-Error-Bars-on-a-Histogram/m-p/895203#M24115</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2023-09-21T10:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Standard Error Bars on a Histogram?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Standard-Error-Bars-on-a-Histogram/m-p/895232#M24116</link>
      <description>&lt;A href="https://blogs.sas.com/content/iml/2011/10/07/creating-bar-charts-with-confidence-intervals.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2011/10/07/creating-bar-charts-with-confidence-intervals.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2012/01/12/custom-confidence-intervals/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2012/01/12/custom-confidence-intervals/&lt;/A&gt;</description>
      <pubDate>Thu, 21 Sep 2023 11:47:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Standard-Error-Bars-on-a-Histogram/m-p/895232#M24116</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-09-21T11:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: Standard Error Bars on a Histogram?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Standard-Error-Bars-on-a-Histogram/m-p/895247#M24118</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had a lot of success with this just now.&amp;nbsp; I'm getting my SE bars, and still have the DATALABEL at the top.&amp;nbsp; (I just need to find the syntax to set the error bars black in this situation; it seems different than other situations in which I've done that).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, without the "GROUP=" , I am no longer getting the two different colors for the two groups.&amp;nbsp; But if I add "GROUP =", the error bars go away.&amp;nbsp; Ugh, I need to do something else for a living.&amp;nbsp; &amp;nbsp; Thank you...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(current code)&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc sgplot data = /*adcv4*/ adcv0 noautolegend;
     where paramcd = 'LVMASSIX';

     vbar tx / response = pchg stat = mean limitstat = stderr
               datalabel = txtext datalabelpos=top
               datalabelattrs = (color=black family="courier new" size=11 weight=bold) 
               filltype=solid outlineattrs=(color='black');

     styleattrs datacolors = (viypk vligb);

     xaxis label = '   ' 
	       display = (noticks novalues)
           offsetmin = .3 offsetmax = .3;
     yaxis label = 'Mean Percent'
	       labelattrs    = (family = "courier new" size = 10 pt color = black weight = bold)
           values = (-4 to 12 by 2);

     run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(current output)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="davehalltwp_0-1695301093327.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88199i3B6D746FD28E6879/image-size/medium?v=v2&amp;amp;px=400" role="button" title="davehalltwp_0-1695301093327.png" alt="davehalltwp_0-1695301093327.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 12:59:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Standard-Error-Bars-on-a-Histogram/m-p/895247#M24118</guid>
      <dc:creator>davehalltwp</dc:creator>
      <dc:date>2023-09-21T12:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Standard Error Bars on a Histogram?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Standard-Error-Bars-on-a-Histogram/m-p/895256#M24119</link>
      <description>&lt;P&gt;Add GROUPDISPLAY=CLUSTER to the VBAR statement to get your error bars back.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2023 13:36:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Standard-Error-Bars-on-a-Histogram/m-p/895256#M24119</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2023-09-21T13:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Standard Error Bars on a Histogram?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Standard-Error-Bars-on-a-Histogram/m-p/895261#M24120</link>
      <description>Thank you so much, DanH...</description>
      <pubDate>Thu, 21 Sep 2023 13:49:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Standard-Error-Bars-on-a-Histogram/m-p/895261#M24120</guid>
      <dc:creator>davehalltwp</dc:creator>
      <dc:date>2023-09-21T13:49:15Z</dc:date>
    </item>
  </channel>
</rss>

