<?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 Overlaying bar chart and line on one graph with sgplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-bar-chart-and-line-on-one-graph-with-sgplot/m-p/83708#M3093</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been trying to figure out how to have a bar chart (representing exposure) on the second y axis and a line chart (representing frequency) on the first y axis in sgplot.&amp;nbsp; Can anybody help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Mar 2013 19:28:26 GMT</pubDate>
    <dc:creator>dal233</dc:creator>
    <dc:date>2013-03-20T19:28:26Z</dc:date>
    <item>
      <title>Overlaying bar chart and line on one graph with sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-bar-chart-and-line-on-one-graph-with-sgplot/m-p/83708#M3093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been trying to figure out how to have a bar chart (representing exposure) on the second y axis and a line chart (representing frequency) on the first y axis in sgplot.&amp;nbsp; Can anybody help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 19:28:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-bar-chart-and-line-on-one-graph-with-sgplot/m-p/83708#M3093</guid>
      <dc:creator>dal233</dc:creator>
      <dc:date>2013-03-20T19:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying bar chart and line on one graph with sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-bar-chart-and-line-on-one-graph-with-sgplot/m-p/83709#M3094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc gbarline works wonders for this sort of graphs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, &lt;A __default_attr="77982" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; has a magnificent website where you can find plots (with WORKING SAS code)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://robslink.com/SAS/democd7/aaaindex.htm" title="http://robslink.com/SAS/democd7/aaaindex.htm"&gt;http://robslink.com/SAS/democd7/aaaindex.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anca.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 19:34:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-bar-chart-and-line-on-one-graph-with-sgplot/m-p/83709#M3094</guid>
      <dc:creator>AncaTilea</dc:creator>
      <dc:date>2013-03-20T19:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying bar chart and line on one graph with sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-bar-chart-and-line-on-one-graph-with-sgplot/m-p/83710#M3095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See this example of using PROC SGPLOT:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/grstatproc/65235/HTML/default/viewer.htm#n1mp0swy0atvzun1oeqlkrg8d89o.htm" title="http://support.sas.com/documentation/cdl/en/grstatproc/65235/HTML/default/viewer.htm#n1mp0swy0atvzun1oeqlkrg8d89o.htm"&gt;SAS(R) 9.3 ODS Graphics: Procedures Guide, Third Edition&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 19:37:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-bar-chart-and-line-on-one-graph-with-sgplot/m-p/83710#M3095</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2013-03-20T19:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying bar chart and line on one graph with sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-bar-chart-and-line-on-one-graph-with-sgplot/m-p/83711#M3096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've just resolved this.&amp;nbsp; I was using a series statement instead of a vline statement for the line graph.&amp;nbsp; If I use vline it works with the y2axis option.&lt;/P&gt;&lt;P&gt;proc sgplot data = test;&lt;/P&gt;&lt;P&gt;vline year / response = frequency y2axis;&lt;/P&gt;&lt;P&gt;vbar year / response = gwp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Strangely though, the vbar statement does not offer the y2axis option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 19:38:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-bar-chart-and-line-on-one-graph-with-sgplot/m-p/83711#M3096</guid>
      <dc:creator>dal233</dc:creator>
      <dc:date>2013-03-20T19:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Overlaying bar chart and line on one graph with sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Overlaying-bar-chart-and-line-on-one-graph-with-sgplot/m-p/83712#M3097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In SAS 9.4 we have added the ability to assign bar charts to secondary axes. In SAS 9.2 and 9.3, you should be able to assign the bar chart (vbar) to the first Y axis and the line chart (vline) to the secondary Y axis. Here is a simple example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sgplot data=sashelp.class;&lt;/P&gt;&lt;P&gt;vbar age / response=height stat=mean;&lt;/P&gt;&lt;P&gt;vline age / y2axis;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 19:38:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Overlaying-bar-chart-and-line-on-one-graph-with-sgplot/m-p/83712#M3097</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2013-03-20T19:38:57Z</dc:date>
    </item>
  </channel>
</rss>

