<?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: Different curve plotting in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Different-curve-plotting/m-p/317903#M11123</link>
    <description>&lt;P&gt;Did you really mean to say SAS &lt;STRONG&gt;9.0? &lt;/STRONG&gt;&amp;nbsp;Please confirm. I assume you have SAS/GRAPH?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, then according to the article &lt;A href="http://blogs.sas.com/content/iml/2013/08/02/how-old-is-your-version-of-sas-release-dates-for-sas-software.html" target="_self"&gt;"How old is your version of SAS,"&lt;/A&gt; that version of SAS was shipped in 2002. There have been 11 releases of SAS in the last 14 years, with lots of awesome ways to solve this problem.&lt;/P&gt;</description>
    <pubDate>Fri, 09 Dec 2016 14:15:15 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2016-12-09T14:15:15Z</dc:date>
    <item>
      <title>Different curve plotting</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Different-curve-plotting/m-p/317841#M11121</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a function of the form: P=a*(t**b)*exp(-c*t)&lt;BR /&gt;What I'm looking for is how to draw different curves depending on the month of the beginning of the action and have a tracing that looks like the attached model.&lt;BR /&gt;My data are as follows:&lt;/P&gt;&lt;P&gt;Id &amp;nbsp; &amp;nbsp; a &amp;nbsp; &amp;nbsp; b &amp;nbsp; &amp;nbsp; c &amp;nbsp; &amp;nbsp; &amp;nbsp;month &amp;nbsp; &amp;nbsp; P&lt;/P&gt;&lt;P&gt;a ranges from 3 to 50 and mean=13&lt;/P&gt;&lt;P&gt;b ranges from 0.01 to 1 and mean=0.27&lt;/P&gt;&lt;P&gt;c ranges from 0.0001 to 0.04 and mean=0.0045&lt;/P&gt;&lt;P&gt;t ranges from 1 to 305.&lt;/P&gt;&lt;P&gt;The curves to be plotted do not interest each id but id groups that have the same month of the beginning of the action.&lt;/P&gt;&lt;P&gt;My SAS version is 9.0&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13240i0DA8F961CB94F3C9/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="curves.jpg" title="curves.jpg" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13241i2AA6793423D418D1/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="curves.jpg" title="curves.jpg" /&gt;</description>
      <pubDate>Fri, 09 Dec 2016 10:08:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Different-curve-plotting/m-p/317841#M11121</guid>
      <dc:creator>soumri</dc:creator>
      <dc:date>2016-12-09T10:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Different curve plotting</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Different-curve-plotting/m-p/317903#M11123</link>
      <description>&lt;P&gt;Did you really mean to say SAS &lt;STRONG&gt;9.0? &lt;/STRONG&gt;&amp;nbsp;Please confirm. I assume you have SAS/GRAPH?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, then according to the article &lt;A href="http://blogs.sas.com/content/iml/2013/08/02/how-old-is-your-version-of-sas-release-dates-for-sas-software.html" target="_self"&gt;"How old is your version of SAS,"&lt;/A&gt; that version of SAS was shipped in 2002. There have been 11 releases of SAS in the last 14 years, with lots of awesome ways to solve this problem.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2016 14:15:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Different-curve-plotting/m-p/317903#M11123</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-12-09T14:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Different curve plotting</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Different-curve-plotting/m-p/317915#M11125</link>
      <description>&lt;P&gt;I believe that your data description is incomplete. You say you have a formula P=a*(t**b)*exp(-c*t). You do not have a variable t mentioned in your data.&lt;/P&gt;
&lt;P&gt;Also if "month" is supposed to be the month of something beginning (also not obvious) then you will need a different variable for your x axis, which appears to be dates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you requesting help on how to take a set of parameters (a b and c) and generate a series of "t" values&amp;nbsp;and then&amp;nbsp;actually calculate ?&lt;/P&gt;
&lt;P&gt;I would help to actually show some of your data.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2016 15:28:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Different-curve-plotting/m-p/317915#M11125</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-12-09T15:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Different curve plotting</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Different-curve-plotting/m-p/317918#M11126</link>
      <description>&lt;P&gt;Yes, unfortunately, this is the only version we have in our lab. I downloaded SAS University Edition but I did not find myself comfortable with it.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2016 15:35:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Different-curve-plotting/m-p/317918#M11126</guid>
      <dc:creator>soumri</dc:creator>
      <dc:date>2016-12-09T15:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Different curve plotting</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Different-curve-plotting/m-p/317927#M11128</link>
      <description>&lt;P&gt;Yes, you are absolutely right. For the tracing of the curve "t" is set to pitch values of 5 starting from 5 to 305.&lt;/P&gt;&lt;P&gt;Let me explain,&lt;BR /&gt;In fact the values of P are productions calculated from the parameters a b and c. P evolves according to time "t" and I can follow the tendency with a curve.&lt;BR /&gt;What I seek is to put on a single graph the productions of individuals who started their activity in January, those of February etc ... but different axes with steps of 1 month. Thank you for your interest in my question.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2016 15:57:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Different-curve-plotting/m-p/317927#M11128</guid>
      <dc:creator>soumri</dc:creator>
      <dc:date>2016-12-09T15:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Different curve plotting</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Different-curve-plotting/m-p/317931#M11129</link>
      <description>&lt;P&gt;What UNIT is T measured in? what interval?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The do loop in this example is one basic way to generate the data for the curve for each set of parameters in your data.&lt;/P&gt;
&lt;PRE&gt;data example;
   month=1;
   a= 3;
   b= 4;
   c= 5;
   do t=5 to 305;
      P=a*(t**b)*exp(-c*t);
      output;
   end;
run; &lt;/PRE&gt;
&lt;P&gt;To generate something that is meaningful in terms of "months" you are going to be involved with DATE manipulation some where, otherwise you won't get a transition for Month=12 to Month=1 as shown on your axis. We would need what the T is supposed to be, especially if it is not simpliy "days".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2016 16:22:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Different-curve-plotting/m-p/317931#M11129</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-12-09T16:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Different curve plotting</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Different-curve-plotting/m-p/317951#M11130</link>
      <description>&lt;P&gt;I did it &amp;nbsp;for each month of beginning of the execice (production) and in this case the abscissa axis is mentioned in day from 5 to 305, but the curves being on packed and the comparison is not easy. So I want to have the same curves (according to the starting months of the exercise) shifted by one step and each step represents the beginning month of the exercise&amp;nbsp;as following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/6301i41D62658DEC15695/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="exemple.jpg" title="exemple.jpg" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2016 17:43:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Different-curve-plotting/m-p/317951#M11130</guid>
      <dc:creator>soumri</dc:creator>
      <dc:date>2016-12-09T17:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Different curve plotting</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Different-curve-plotting/m-p/317960#M11131</link>
      <description>&lt;P&gt;This may get you started&lt;/P&gt;
&lt;PRE&gt;data parm ;
   input id a b c month;
datalines;
1  5  0.2 0.003 1
2  8  0.5 0.01  2
;
run;
data plot;
   set parm;
   plotstart= mdy(month,1,1960);
   do t=5 to 305;
      Plotdate= plotstart+t;
      P=a*(t**b)*exp(-c*t);
      if t=5 then Ny=p;
      else NY=.;
      output;
   end;
   /* to use the BREAK option in series plot so each
      "months" series isn't connected to the other
      we need a missing Y value*/
   plotdate=plotdate+1;
   p=.;
   output;
run;
ods graphics on;
proc sgplot data=plot;
   series x=plotdate y=p/break name='L' ;
   needle x=plotdate y=ny/lineattrs=(pattern=4) name='N';
   format Plotdate monname3.;
   keylegend 'L';
run;
&lt;/PRE&gt;
&lt;P&gt;There are additional attribute data sets to set things like line colors associated with values of variables but you'll have to investigate those on your own.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2016 18:21:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Different-curve-plotting/m-p/317960#M11131</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-12-09T18:21:44Z</dc:date>
    </item>
  </channel>
</rss>

