<?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 to make time series plot? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-time-series-plot/m-p/707843#M217401</link>
    <description>&lt;P&gt;See if you can use this as a template&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a17;
input  year a1-a9;
cards;
104 4 2 3	2 11 7 3 0 1
105 2 0 4	1 12 6 3 0 0
106 5 2 5	2 8 4 5 1 0
107 3 2 3	1 20 6 3 1 0
;

proc transpose data=a17 out=plot(rename = (col1=a _NAME_=n));
   by year;
run;

proc sgplot data = plot;
   series x = n y = a / group= year lineattrs=(thickness=3);
   styleattrs datacontrastcolors=(blue orange grey gold);
   yaxis min = 0 max = 25 grid display=(nolabel);
   xaxis display=(nolabel);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="SGPlot10.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52979iCEC75FDEA36AD3A6/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGPlot10.png" alt="SGPlot10.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Dec 2020 08:05:12 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2020-12-23T08:05:12Z</dc:date>
    <item>
      <title>How to make time series plot?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-time-series-plot/m-p/707841#M217400</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EXCEL.png" style="width: 481px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52978i6730E93DD6D859FA/image-size/large?v=v2&amp;amp;px=999" role="button" title="EXCEL.png" alt="EXCEL.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This photo is plot by excel.&lt;/P&gt;&lt;P&gt;How can I make like this by sas?&lt;/P&gt;&lt;P&gt;I try many times but failed!&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a17;
input  year a1-a9;
cards;
104 4 2 3	2 11 7 3 0 1
105 2 0 4	1 12 6 3 0 0
106 5 2 5	2 8 4 5 1 0
107 3 2 3	1 20 6 3 1 0
;
proc print;run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2020 07:55:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-time-series-plot/m-p/707841#M217400</guid>
      <dc:creator>yuwentaiwan</dc:creator>
      <dc:date>2020-12-23T07:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to make time series plot?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-time-series-plot/m-p/707843#M217401</link>
      <description>&lt;P&gt;See if you can use this as a template&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a17;
input  year a1-a9;
cards;
104 4 2 3	2 11 7 3 0 1
105 2 0 4	1 12 6 3 0 0
106 5 2 5	2 8 4 5 1 0
107 3 2 3	1 20 6 3 1 0
;

proc transpose data=a17 out=plot(rename = (col1=a _NAME_=n));
   by year;
run;

proc sgplot data = plot;
   series x = n y = a / group= year lineattrs=(thickness=3);
   styleattrs datacontrastcolors=(blue orange grey gold);
   yaxis min = 0 max = 25 grid display=(nolabel);
   xaxis display=(nolabel);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="SGPlot10.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52979iCEC75FDEA36AD3A6/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGPlot10.png" alt="SGPlot10.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2020 08:05:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-time-series-plot/m-p/707843#M217401</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-12-23T08:05:12Z</dc:date>
    </item>
  </channel>
</rss>

