<?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 can I create overlay standard deviation series on a vbar mean graph using proc SGplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-can-I-create-overlay-standard-deviation-series-on-a-vbar/m-p/906186#M24220</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile cards expandtabs truncover;
input Sample_name :$20.	Replicate $ Read_Mean	Read_std;
YERRORUPPER=Read_Mean+1.96*Read_std;
YERRORLOWER=Read_Mean-1.96*Read_std;
cards;
Ad-Ct25	En	99.9981137	0.004001
Ad-Ct25	Mg	99.8808502	0.077763
Ad-Ct28	En	99.8575861	0.241182
Ad-Ct28	Mg	92.0169639	1.59308
Ad-Ct31	En	93.3995416	3.462698
Ad-Ct31	Mg	55.0308563	7.835461
Ad-Ct34	En	42.7004962	8.213055
Ad-Ct34	Mg	16.445265	3.89857
;

proc sgplot data=have;
vbarparm category=Sample_name response=Read_Mean/group=Replicate nooutline groupdisplay=cluster displaybaseline=off;
scatter x=Sample_name y=Read_Mean/YERRORUPPER=YERRORUPPER YERRORLOWER=YERRORLOWER 
group=Replicate groupdisplay=cluster markerattrs=(size=0)  ERRORBARATTRS=(thickness=2) ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1701761336666.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/90789i1B4850D4C6A1B2B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1701761336666.png" alt="Ksharp_0-1701761336666.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Dec 2023 07:29:04 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2023-12-05T07:29:04Z</dc:date>
    <item>
      <title>How can I create overlay standard deviation series on a vbar mean graph using proc SGplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-can-I-create-overlay-standard-deviation-series-on-a-vbar/m-p/905751#M24214</link>
      <description>&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;proc sgplot data=main_subset PCTLEVEL=GRAPH;&lt;/DIV&gt;
&lt;DIV&gt;styleattrs datacolors=(Red Blue) datacontrastcolors=(Red Blue);&lt;/DIV&gt;
&lt;DIV&gt;vbar Sample_name&amp;nbsp; / response =&amp;nbsp; Read_Mean&amp;nbsp; group=Replicate&amp;nbsp; groupdisplay = cluster nooutline Clusterwidth=0.8 datalabel&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; stat=mean dataskin=pressed;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; xaxis display=(nolabel noticks) discreteorder=data FITPOLICY=ROTATE;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; yaxis label="% Total&amp;nbsp; " ;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;keylegend /title='' noborder autooutline;&lt;/DIV&gt;
&lt;DIV&gt;run;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I want to have over lay graph with my standard deviation column name &lt;STRONG&gt;Read_std&lt;/STRONG&gt;. Do I need to have low and high columns?&lt;/DIV&gt;
&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Stalk_0-1701467716571.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/90676i04B038F976CAE633/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Stalk_0-1701467716571.png" alt="Stalk_0-1701467716571.png" /&gt;&lt;/span&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 Dec 2023 21:55:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-can-I-create-overlay-standard-deviation-series-on-a-vbar/m-p/905751#M24214</guid>
      <dc:creator>Stalk</dc:creator>
      <dc:date>2023-12-01T21:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create overlay standard deviation series on a vbar mean graph using proc SGplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-can-I-create-overlay-standard-deviation-series-on-a-vbar/m-p/905775#M24215</link>
      <description>&lt;P&gt;Use VBARBASIC instead of VBAR to allow use of series or scatter and bar graph in the same graph.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure what you&amp;nbsp; mean by "Do I need to have low and high columns?". If you are looking at setting the upper/lower value of an error bar then that might be the YERRORUPPER and YERRORLOWER options in the SCATTER plot.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 22:27:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-can-I-create-overlay-standard-deviation-series-on-a-vbar/m-p/905775#M24215</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-12-01T22:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create overlay standard deviation series on a vbar mean graph using proc SGplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-can-I-create-overlay-standard-deviation-series-on-a-vbar/m-p/905790#M24216</link>
      <description>&lt;P&gt;As &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;was saying, you can use vbarbasic to render the mean-calculated bar chart and allow a scatter overlay. The VBARPARM statement also has more flexible overlay support, but you would have to do the calculation outside of the procedure. You will need high and low columns to hold the limit values for your scatter plot. The code will looks something like the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;proc sgplot data=main_subset PCTLEVEL=GRAPH;&lt;/DIV&gt;
&lt;DIV&gt;styleattrs datacolors=(Red Blue) datacontrastcolors=(Red Blue);&lt;/DIV&gt;
&lt;DIV&gt;vbarbasic Sample_name&amp;nbsp; / response =&amp;nbsp; Read_Mean&amp;nbsp; group=Replicate&amp;nbsp; groupdisplay = cluster nooutline Clusterwidth=0.8 datalabel&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; stat=mean dataskin=pressed;&lt;/DIV&gt;
&lt;DIV&gt;scatter x=Sample_name y=StdDev / noerrorcaps yerrorupper=UpperVar yerrorlower=LowerVar datalabel;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; xaxis display=(nolabel noticks) discreteorder=data FITPOLICY=ROTATE;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; yaxis label="% Total&amp;nbsp; " ;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;keylegend /title='' noborder autooutline;&lt;/DIV&gt;
&lt;DIV&gt;run;&lt;/DIV&gt;</description>
      <pubDate>Sat, 02 Dec 2023 02:20:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-can-I-create-overlay-standard-deviation-series-on-a-vbar/m-p/905790#M24216</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2023-12-02T02:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create overlay standard deviation series on a vbar mean graph using proc SGplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-can-I-create-overlay-standard-deviation-series-on-a-vbar/m-p/906026#M24217</link>
      <description>&lt;P&gt;Here is my data and below is my graph.&amp;nbsp; Not sure how to calculate high, low values for StDev from Read_std. I want to show my Read_std range on the top of vbar to show the range like in blue ?&lt;/P&gt;
&lt;TABLE width="295"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="89"&gt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TR&gt;
&lt;TR&gt;
&lt;TD&gt;Ad-Ct34&lt;/TD&gt;
&lt;TD&gt;Mg&lt;/TD&gt;
&lt;TD&gt;16.445265&lt;/TD&gt;
&lt;TD&gt;3.89857&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Stalk_1-1701702211002.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/90751iEA5A5A866E724535/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Stalk_1-1701702211002.png" alt="Stalk_1-1701702211002.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 15:04:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-can-I-create-overlay-standard-deviation-series-on-a-vbar/m-p/906026#M24217</guid>
      <dc:creator>Stalk</dc:creator>
      <dc:date>2023-12-04T15:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create overlay standard deviation series on a vbar mean graph using proc SGplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-can-I-create-overlay-standard-deviation-series-on-a-vbar/m-p/906041#M24218</link>
      <description>&lt;P&gt;I would create a little data step to calculate the high and lows relative to the mean. Something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data main_subset2;&lt;/P&gt;
&lt;P&gt;set main_subset;&lt;/P&gt;
&lt;P&gt;high = read_mean + read_std;&lt;/P&gt;
&lt;P&gt;low = read_mean - read_std;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then, use main_subset2 in your SGPLOT call. Use the HIGH and LOW variables in the YERRORUPPER and YERRORLOWER options, respectively.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 15:43:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-can-I-create-overlay-standard-deviation-series-on-a-vbar/m-p/906041#M24218</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2023-12-04T15:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create overlay standard deviation series on a vbar mean graph using proc SGplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-can-I-create-overlay-standard-deviation-series-on-a-vbar/m-p/906186#M24220</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile cards expandtabs truncover;
input Sample_name :$20.	Replicate $ Read_Mean	Read_std;
YERRORUPPER=Read_Mean+1.96*Read_std;
YERRORLOWER=Read_Mean-1.96*Read_std;
cards;
Ad-Ct25	En	99.9981137	0.004001
Ad-Ct25	Mg	99.8808502	0.077763
Ad-Ct28	En	99.8575861	0.241182
Ad-Ct28	Mg	92.0169639	1.59308
Ad-Ct31	En	93.3995416	3.462698
Ad-Ct31	Mg	55.0308563	7.835461
Ad-Ct34	En	42.7004962	8.213055
Ad-Ct34	Mg	16.445265	3.89857
;

proc sgplot data=have;
vbarparm category=Sample_name response=Read_Mean/group=Replicate nooutline groupdisplay=cluster displaybaseline=off;
scatter x=Sample_name y=Read_Mean/YERRORUPPER=YERRORUPPER YERRORLOWER=YERRORLOWER 
group=Replicate groupdisplay=cluster markerattrs=(size=0)  ERRORBARATTRS=(thickness=2) ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1701761336666.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/90789i1B4850D4C6A1B2B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1701761336666.png" alt="Ksharp_0-1701761336666.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 07:29:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-can-I-create-overlay-standard-deviation-series-on-a-vbar/m-p/906186#M24220</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-12-05T07:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: How can I create overlay standard deviation series on a vbar mean graph using proc SGplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-can-I-create-overlay-standard-deviation-series-on-a-vbar/m-p/906293#M24223</link>
      <description>&lt;P&gt;Perfect. Thank you so much ballardw, Dan and Ksharp. This is exactly what I need.&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1877"&gt;@Dan&lt;/a&gt;, Sorry for my delayed reposnse, I was trying on my real data where the response values are very low (0.002) for one replicate and 99.9 for another replicate. Having hard time to show on the same scale. All is well now. Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 17:49:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-can-I-create-overlay-standard-deviation-series-on-a-vbar/m-p/906293#M24223</guid>
      <dc:creator>Stalk</dc:creator>
      <dc:date>2023-12-05T17:49:13Z</dc:date>
    </item>
  </channel>
</rss>

