<?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 Proc SGPLOT: Overlay a bar chart with a trend line? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPLOT-Overlay-a-bar-chart-with-a-trend-line/m-p/467402#M16073</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to add a line to the chart produced from the code below. I want it to the serve the purpose of highlighting the difference between the two bars (in terms of the height of each bar). Does anyone know what additions I need to incorporate in the code below?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;title&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;height&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;20&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;pt &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Forecast Error by Method"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;title2&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;height&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;17&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;pt &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Overall SBU Level for Year &amp;amp;Year"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sgplot&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=Append_Table2_Year;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;styleattrs&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datacolors&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(red blue);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;vbar&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Method / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;Response&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=Avg_Error_by_Method &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;stat&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=mean &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datalabel&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datalabelattrs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;size&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;15&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;pt) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;group&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=Method;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;xaxis&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;display&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(nolabel)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;labelattrs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;size&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;15&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;valueattrs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;size&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;13&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;yaxis&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;labelattrs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;size&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;15&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;max&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;15&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;keylegend&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;titleattrs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;size&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;valueattrs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;size&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;location&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=outside;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Thanks!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;-Z&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jun 2018 13:52:08 GMT</pubDate>
    <dc:creator>zdblizar</dc:creator>
    <dc:date>2018-06-04T13:52:08Z</dc:date>
    <item>
      <title>Proc SGPLOT: Overlay a bar chart with a trend line?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPLOT-Overlay-a-bar-chart-with-a-trend-line/m-p/467402#M16073</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to add a line to the chart produced from the code below. I want it to the serve the purpose of highlighting the difference between the two bars (in terms of the height of each bar). Does anyone know what additions I need to incorporate in the code below?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;title&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;height&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;20&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;pt &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Forecast Error by Method"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;title2&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;height&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;17&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;pt &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Overall SBU Level for Year &amp;amp;Year"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sgplot&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=Append_Table2_Year;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;styleattrs&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datacolors&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(red blue);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;vbar&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Method / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;Response&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=Avg_Error_by_Method &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;stat&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=mean &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datalabel&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datalabelattrs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;size&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;15&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;pt) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;group&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=Method;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;xaxis&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;display&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(nolabel)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;labelattrs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;size&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;15&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;valueattrs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;size&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;13&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;yaxis&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;labelattrs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;size&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;15&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;max&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;15&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;keylegend&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;titleattrs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;size&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;valueattrs&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;size&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;location&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=outside;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Thanks!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;-Z&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 13:52:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPLOT-Overlay-a-bar-chart-with-a-trend-line/m-p/467402#M16073</guid>
      <dc:creator>zdblizar</dc:creator>
      <dc:date>2018-06-04T13:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGPLOT: Overlay a bar chart with a trend line?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPLOT-Overlay-a-bar-chart-with-a-trend-line/m-p/467407#M16074</link>
      <description>&lt;P&gt;The simplest way is to add a VLINE using the same variables as the VBAR:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title height=20pt "Forecast Error by Method";
title2 height=17pt "Overall SBU Level for Year &amp;amp;Year";
proc sgplot data=Append_Table2_Year;
styleattrs datacolors=(red blue);
vbar Method / Response=Avg_Error_by_Method stat=mean datalabel datalabelattrs=(size=15pt) group=Method;
vline Method / Response=Avg_Error_by_Method stat=mean group=Method;
xaxis display=(nolabel)
labelattrs=(size=15)
valueattrs=(size=13);
yaxis labelattrs=(size=15) max=15;
keylegend / titleattrs=(size=12) valueattrs=(size=12) location=outside;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 14:02:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Proc-SGPLOT-Overlay-a-bar-chart-with-a-trend-line/m-p/467407#M16074</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-06-04T14:02:53Z</dc:date>
    </item>
  </channel>
</rss>

