<?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: Using gbarline, is there a way to plot 2 lines on same graph? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Using-gbarline-is-there-a-way-to-plot-2-lines-on-same-graph/m-p/72958#M2633</link>
    <description>Thanks -- I will give it a shot!</description>
    <pubDate>Wed, 23 Sep 2009 19:15:43 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-09-23T19:15:43Z</dc:date>
    <item>
      <title>Using gbarline, is there a way to plot 2 lines on same graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-gbarline-is-there-a-way-to-plot-2-lines-on-same-graph/m-p/72954#M2629</link>
      <description>I'd like to show the change in use of something over time (left y axis (bar)=% use; x-axis= year) by the growth in # of something else (right y-axis (line)).  But, there are two subgroups for the line plot.  Is there any way to get this on 1 graph rather than have a separate graph for each subgroup of axis 3?&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Wed, 23 Sep 2009 14:45:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-gbarline-is-there-a-way-to-plot-2-lines-on-same-graph/m-p/72954#M2629</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-09-23T14:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using gbarline, is there a way to plot 2 lines on same graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-gbarline-is-there-a-way-to-plot-2-lines-on-same-graph/m-p/72955#M2630</link>
      <description>What version of SAS are you using?</description>
      <pubDate>Wed, 23 Sep 2009 15:13:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-gbarline-is-there-a-way-to-plot-2-lines-on-same-graph/m-p/72955#M2630</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2009-09-23T15:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using gbarline, is there a way to plot 2 lines on same graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-gbarline-is-there-a-way-to-plot-2-lines-on-same-graph/m-p/72956#M2631</link>
      <description>Windows 9.1.3 SP 4</description>
      <pubDate>Wed, 23 Sep 2009 15:20:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-gbarline-is-there-a-way-to-plot-2-lines-on-same-graph/m-p/72956#M2631</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-09-23T15:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using gbarline, is there a way to plot 2 lines on same graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-gbarline-is-there-a-way-to-plot-2-lines-on-same-graph/m-p/72957#M2632</link>
      <description>Hey Julie,&lt;BR /&gt;
&lt;BR /&gt;
In SAS 9.2, this is very simple to do.  In 9.1.3, I had to take a more creative approach. Try the sample below and see if you can make it work for you.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
Dan&lt;BR /&gt;
&lt;BR /&gt;
/* summarize your data */&lt;BR /&gt;
proc means data=sashelp.class noprint;&lt;BR /&gt;
class age sex;&lt;BR /&gt;
var weight height;&lt;BR /&gt;
output out=class mean=;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
/* Adjust some fields for correct plotting */ &lt;BR /&gt;
data class2;&lt;BR /&gt;
set class;&lt;BR /&gt;
if (_type_ ne 2) then weight=.;&lt;BR /&gt;
if (_type_ ne 3) then height=.;&lt;BR /&gt;
if (sex eq " ") then sex="M";&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
symbol1 i=needle width=40 color=blue;&lt;BR /&gt;
symbol2 i=join;&lt;BR /&gt;
axis1 offset=(5pct, 5pct) minor=none;&lt;BR /&gt;
axis2 order=(0 to 150 by 25) offset=(0,0);&lt;BR /&gt;
axis3 order=(0 to 80 by 20) offset=(0,0);&lt;BR /&gt;
&lt;BR /&gt;
proc gplot data=class2;&lt;BR /&gt;
plot weight*age / haxis=axis1 vaxis=axis2;&lt;BR /&gt;
plot2 height*age=sex / vaxis=axis3;&lt;BR /&gt;
run;</description>
      <pubDate>Wed, 23 Sep 2009 17:04:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-gbarline-is-there-a-way-to-plot-2-lines-on-same-graph/m-p/72957#M2632</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2009-09-23T17:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using gbarline, is there a way to plot 2 lines on same graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-gbarline-is-there-a-way-to-plot-2-lines-on-same-graph/m-p/72958#M2633</link>
      <description>Thanks -- I will give it a shot!</description>
      <pubDate>Wed, 23 Sep 2009 19:15:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-gbarline-is-there-a-way-to-plot-2-lines-on-same-graph/m-p/72958#M2633</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-09-23T19:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using gbarline, is there a way to plot 2 lines on same graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-gbarline-is-there-a-way-to-plot-2-lines-on-same-graph/m-p/72959#M2634</link>
      <description>btw, can you tell me the code for version 9.2?  I may have access to it...thx</description>
      <pubDate>Wed, 23 Sep 2009 19:21:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-gbarline-is-there-a-way-to-plot-2-lines-on-same-graph/m-p/72959#M2634</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-09-23T19:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using gbarline, is there a way to plot 2 lines on same graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-gbarline-is-there-a-way-to-plot-2-lines-on-same-graph/m-p/72960#M2635</link>
      <description>In 9.2, gbarline supports multiple plot lines.  Therefore, you can pull your subgroup into separate columns and use gbarline. Here's a simple example:&lt;BR /&gt;
&lt;BR /&gt;
data class;&lt;BR /&gt;
set sashelp.class;&lt;BR /&gt;
if (sex="F") then female=height;&lt;BR /&gt;
if (sex="M") then male=height;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc gbarline data=class;&lt;BR /&gt;
bar age / sumvar=weight;&lt;BR /&gt;
plot / sumvar=female;&lt;BR /&gt;
plot / sumvar=male;&lt;BR /&gt;
run;</description>
      <pubDate>Wed, 23 Sep 2009 19:39:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-gbarline-is-there-a-way-to-plot-2-lines-on-same-graph/m-p/72960#M2635</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2009-09-23T19:39:22Z</dc:date>
    </item>
  </channel>
</rss>

