<?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: Proc SGplot overlaying line graph in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-SGplot-overlaying-line-graph/m-p/906439#M357923</link>
    <description>&lt;P&gt;After creating data set HAVE, run PROC SUMMARY to get the sums, and then run PROC SGPLOT on the output created by PROC SUMMARY.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Dec 2023 13:45:49 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-12-06T13:45:49Z</dc:date>
    <item>
      <title>Proc SGplot overlaying line graph</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SGplot-overlaying-line-graph/m-p/906435#M357921</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the code for the data I have. I am trying to create a line graph with 2 lines showing the qrt_yr on the x-axis and the on the y-axis the number of events but I need the sum of the events cst and bta. My code currently only shows a max of 1 in the graph when, for example, q1-2010 cst should show 3 events. Var1 and Var2 are binary variables, where a 1 indicates the event occurred. Any advice would be helpful. Thank you&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
	input qrt_yr $ var1 var2;
	datalines;
	q1-2010 1 0
	q1-2010 1 0
	q1-2010 1 1
	q1-2010 0 0
	q2-2010 1 0
	q3-2010 1 0
	q4-2010 1 0
	q1-2011 1 0
	q2-2011 0 1
	q3-2011 1 1
	q4-2011 0 1
	q1-2012 1 0
	q2-2012 1 0
	q3-2012 1 0
	q3-2012 1 1
	q4-0212 1 1
	q1-2014 1 1
	q2-2014 1 1
	q3-2014 1 1
	q3-2014 1 1
	q4-2014 0 1
	;
run;

proc sgplot data= have; 
	series x= qrt_yr y= var1; 
	series x= qrt_yr y= var2;	
run; 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Dec 2023 13:32:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SGplot-overlaying-line-graph/m-p/906435#M357921</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2023-12-06T13:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGplot overlaying line graph</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SGplot-overlaying-line-graph/m-p/906439#M357923</link>
      <description>&lt;P&gt;After creating data set HAVE, run PROC SUMMARY to get the sums, and then run PROC SGPLOT on the output created by PROC SUMMARY.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 13:45:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SGplot-overlaying-line-graph/m-p/906439#M357923</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-12-06T13:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Proc SGplot overlaying line graph</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-SGplot-overlaying-line-graph/m-p/906457#M357931</link>
      <description>&lt;P&gt;Attached is my code for the proc summary. When I do this it returns the number of observations per quarter and year, I would like it to return the times var1=1 and the number of times var2=1 and plot both of those lines on a graph to see how they move in relationship to one another. Is there a way to modify this code to accomplish that. Thank you&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data= check8;
	class qrt_yr;
	var var1 var2;
	output out=check9;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Dec 2023 14:51:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-SGplot-overlaying-line-graph/m-p/906457#M357931</guid>
      <dc:creator>GS2</dc:creator>
      <dc:date>2023-12-06T14:51:36Z</dc:date>
    </item>
  </channel>
</rss>

