<?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: Problem with Proc sgplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Problem-with-Proc-sgplot/m-p/778123#M22236</link>
    <description>&lt;P&gt;Yes, you are right, I deleted the dot. Now this kind of thing appears to me.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gieorgie_0-1635935728668.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65338i6750BF15BFCFAA88/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gieorgie_0-1635935728668.png" alt="Gieorgie_0-1635935728668.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;policy_today shows which vertical bar in 2022. Although in the table both values start at the same time and go almost equally&lt;/P&gt;
&lt;P&gt;I wish there were two lines. x =polciy_vintage y = count let's say&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gieorgie_0-1635937477283.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65340i9A5AAB6C2ECAE971/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gieorgie_0-1635937477283.png" alt="Gieorgie_0-1635937477283.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Nov 2021 11:04:46 GMT</pubDate>
    <dc:creator>Gieorgie</dc:creator>
    <dc:date>2021-11-03T11:04:46Z</dc:date>
    <item>
      <title>Problem with Proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Problem-with-Proc-sgplot/m-p/778117#M22234</link>
      <description>&lt;P&gt;I would like to make a plot line from this table, but it fails, it shows that there are no such names. What am I doing wrong ?&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;POLICY_VINTAGE&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;POLICY_TODAY&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;POLICY_PRIOR&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;2008-11&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;2010-01&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;3&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;2010-03&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;2010-05&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;2010-06&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;2&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;2010-07&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;2010-09&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;2010-11&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;2011-01&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;2011-03&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My code :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;proc sql;
    create table diff as
        select today.policy_vintage
             , today.number_policy as POLICY_TODAY
             , prior.number_policy as POLICY_PRIOR
			 , today.number_policy - prior.number_policy as DIFFRENCE
        from policy_vintage_weekly today
        LEFT JOIN
             (select *
              from _work.POLICY_VINTAGE_WEEKLY
              where run_date &amp;lt; today()
              having run_date = max(run_date)
             ) prior
        ON today.policy_vintage = prior.policy_vintage
   ;
quit;

proc sgplot data=diff;
series x=today.policy_vintage y=POLICY_TODAY / markerattrs=(color=vligb symbol=circlefilled size=9) 
          lineattrs=(color=vligb thickness=2);
series x=today.policy_vintage y=POLICY_PRIOR / y2axis markerattrs=(color=salmon symbol=circlefilled size=9) 
          lineattrs=(color=salmon thickness=2);
run;
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 10:16:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Problem-with-Proc-sgplot/m-p/778117#M22234</guid>
      <dc:creator>Gieorgie</dc:creator>
      <dc:date>2021-11-03T10:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Problem-with-Proc-sgplot/m-p/778119#M22235</link>
      <description>&lt;P&gt;From now on, when there are errors in the LOG, show us the ENTIRE log for this portion of your code. Do not tell us there are errors, SHOW US the LOG.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;x=today.policy_vintage&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There is no such variable as &lt;FONT face="courier new,courier"&gt;today.policy_vintage&lt;/FONT&gt;. Variable names never have dots in them.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 10:25:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Problem-with-Proc-sgplot/m-p/778119#M22235</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-11-03T10:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Problem-with-Proc-sgplot/m-p/778123#M22236</link>
      <description>&lt;P&gt;Yes, you are right, I deleted the dot. Now this kind of thing appears to me.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gieorgie_0-1635935728668.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65338i6750BF15BFCFAA88/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gieorgie_0-1635935728668.png" alt="Gieorgie_0-1635935728668.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;policy_today shows which vertical bar in 2022. Although in the table both values start at the same time and go almost equally&lt;/P&gt;
&lt;P&gt;I wish there were two lines. x =polciy_vintage y = count let's say&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gieorgie_0-1635937477283.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65340i9A5AAB6C2ECAE971/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gieorgie_0-1635937477283.png" alt="Gieorgie_0-1635937477283.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 11:04:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Problem-with-Proc-sgplot/m-p/778123#M22236</guid>
      <dc:creator>Gieorgie</dc:creator>
      <dc:date>2021-11-03T11:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Problem-with-Proc-sgplot/m-p/778146#M22237</link>
      <description>&lt;P&gt;Runnng your code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data diff;
input policy_vintage :$7. policy_today policy_prior;
datalines;
2008-11 1 1
2010-01 3 3
2010-03 1 1
2010-05 1 1
2010-06 2 2
2010-07 1 1
2010-09 1 1
2010-11 1 1
2011-01 1 1
2011-03 1 1
;

proc sgplot data=diff;
series x=policy_vintage y=POLICY_TODAY / markerattrs=(color=vligb symbol=circlefilled size=9) 
          lineattrs=(color=vligb thickness=2);
series x=policy_vintage y=POLICY_PRIOR / y2axis markerattrs=(color=salmon symbol=circlefilled size=9) 
          lineattrs=(color=salmon thickness=2);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I get this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Unknown.png"&gt;&lt;img src="https://communities.sas.com/skins/images/E0BB18E7DAA53C21BC28740CEA0E38DA/responsive_peak/images/image_not_found.png" alt="Unknown.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The two plots overlay each other, as both series have identical data.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 11:47:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Problem-with-Proc-sgplot/m-p/778146#M22237</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-11-03T11:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Problem-with-Proc-sgplot/m-p/778150#M22238</link>
      <description>&lt;P&gt;Thanks, yes i see now, is it chance to divide plot to panel like a below ?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gieorgie_0-1635940326423.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65342i722ED919715A1496/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gieorgie_0-1635940326423.png" alt="Gieorgie_0-1635940326423.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 11:52:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Problem-with-Proc-sgplot/m-p/778150#M22238</guid>
      <dc:creator>Gieorgie</dc:creator>
      <dc:date>2021-11-03T11:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Problem-with-Proc-sgplot/m-p/778168#M22239</link>
      <description>&lt;P&gt;A long layout allows you to use BY:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data diff;
input policy_vintage :$7. policy_today policy_prior;
datalines;
2008-11 1 1
2010-01 3 3
2010-03 1 1
2010-05 1 1
2010-06 2 2
2010-07 1 1
2010-09 1 1
2010-11 1 1
2011-01 1 1
2011-03 1 1
;

proc transpose data=diff out=long;
by policy_vintage notsorted;
var policy_today policy_prior;
run;

proc sort data=long;
by _name_;
run;

proc sgplot data=long;
by _name_;
series x=policy_vintage y=col1 / markerattrs=(color=vligb symbol=circlefilled size=9) 
          lineattrs=(color=vligb thickness=2);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Nov 2021 12:49:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Problem-with-Proc-sgplot/m-p/778168#M22239</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-11-03T12:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Problem-with-Proc-sgplot/m-p/778172#M22240</link>
      <description>Thanks but is chance to show two plot on panels like panel A for today panel B for prior</description>
      <pubDate>Wed, 03 Nov 2021 13:00:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Problem-with-Proc-sgplot/m-p/778172#M22240</guid>
      <dc:creator>Gieorgie</dc:creator>
      <dc:date>2021-11-03T13:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Problem-with-Proc-sgplot/m-p/778179#M22241</link>
      <description>&lt;P&gt;Have a look at SGPANEL:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgpanel data=long;
panelby _name_;
series x=policy_vintage y=col1 / markerattrs=(color=vligb symbol=circlefilled size=9) 
          lineattrs=(color=vligb thickness=2);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;for&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2011/08/12/side-by-side-bar-plots-in-sas-9-3.html" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/iml/2011/08/12/side-by-side-bar-plots-in-sas-9-3.html&lt;/A&gt;&amp;nbsp;that gave me the SGPANEL idea.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 13:21:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Problem-with-Proc-sgplot/m-p/778179#M22241</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-11-03T13:21:26Z</dc:date>
    </item>
  </channel>
</rss>

