<?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: Can SAS create the attached the shapes of curvers? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Can-SAS-create-the-attached-the-shapes-of-curvers/m-p/508434#M17310</link>
    <description>&lt;P&gt;Using your code, I added some extra data so that you can see how the other two plots can be used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let THRESHOLD = 0;
data wave;
t=0;
do x=0 to 6 by .05;
y=sin(0.5*x);
y2=sin(0.5*x) + 0.5;
if t = 20 then do;
   upper = y2;
   lower = y;
   t = 0;
end;
else do;
   upper=.;
   lower=.;
   t=t+1;
end;
positive = y;
negative = &amp;amp;THRESHOLD;
;
output;
end;
run;

ods path(prepend) work.templat(update);
proc template;
   define style mystyle;
   parent=styles.sasweb;
      class graphwalls /
            frameborder=off;
      class graphbackground /
            color=white;
   end;
run;

ods listing close;
ods html style=mystyle path='.' file='newgraph.html';
ods graphics / reset=all border=off width=600px height=400px imagename="cdh2";
proc print data=wave; run;
proc sgplot data=wave noautolegend;

YAXIS  DISPLAY=NONE  LABEL = " "  ;
XAXIS   DISPLAY=NONE LABEL = " "  ;
band x=x lower=&amp;amp;THRESHOLD
upper=positive / transparency=0.5;
band x=x lower=negative
upper=&amp;amp;THRESHOLD /
transparency=0.5;
series x=x y=y2 / smoothconnect lineattrs=(color=blue thickness=3);
highlow x=x high=upper low=lower / type=bar highcap=filledarrow intervalbarwidth=30px;
title " ";
footnote "";
run;

ods html close;
ods listing;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
    <pubDate>Mon, 29 Oct 2018 17:53:43 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2018-10-29T17:53:43Z</dc:date>
    <item>
      <title>Can SAS create the attached the shapes of curvers?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-SAS-create-the-attached-the-shapes-of-curvers/m-p/508035#M17301</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I found one good&amp;nbsp;graph described customer life value. I wonder if SAS can produce the similar shape of curves.&lt;/P&gt;&lt;P&gt;Sorry I don't have any data.&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ethan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Oct 2018 22:21:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-SAS-create-the-attached-the-shapes-of-curvers/m-p/508035#M17301</guid>
      <dc:creator>t75wez1</dc:creator>
      <dc:date>2018-10-27T22:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can SAS create the attached the shapes of curvers?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-SAS-create-the-attached-the-shapes-of-curvers/m-p/508058#M17302</link>
      <description>&lt;P&gt;Here are some thoughts for you using SGPLOT overlays:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. The "Profit" area can be done using using a BAND plot with a constant lower value (lower=0, for instance)&lt;/P&gt;
&lt;P&gt;2. The line curves can be done using SERIES plots. I would use the SMOOTHCONNECT option to keep them smooth&lt;/P&gt;
&lt;P&gt;3. The arrows can be drawn using a HIGHLOW plot, using TYPE=BAR and HIGHCAP=FILLEDARROW&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Sun, 28 Oct 2018 01:12:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-SAS-create-the-attached-the-shapes-of-curvers/m-p/508058#M17302</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-10-28T01:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can SAS create the attached the shapes of curvers?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-SAS-create-the-attached-the-shapes-of-curvers/m-p/508145#M17304</link>
      <description>&lt;P&gt;Dan,&lt;/P&gt;&lt;P&gt;Thanks a lot. Very helpful suggestion.&lt;/P&gt;&lt;P&gt;I started&amp;nbsp;developing the attached code&amp;nbsp;that seems accomplish the 1) you mentioned.&lt;/P&gt;&lt;P&gt;But I don't know how to put&amp;nbsp;all together.&lt;/P&gt;&lt;P&gt;Could you&amp;nbsp;offer further&amp;nbsp;helps for 2) and 3)?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ethan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Oct 2018 19:11:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-SAS-create-the-attached-the-shapes-of-curvers/m-p/508145#M17304</guid>
      <dc:creator>t75wez1</dc:creator>
      <dc:date>2018-10-28T19:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can SAS create the attached the shapes of curvers?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-SAS-create-the-attached-the-shapes-of-curvers/m-p/508434#M17310</link>
      <description>&lt;P&gt;Using your code, I added some extra data so that you can see how the other two plots can be used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let THRESHOLD = 0;
data wave;
t=0;
do x=0 to 6 by .05;
y=sin(0.5*x);
y2=sin(0.5*x) + 0.5;
if t = 20 then do;
   upper = y2;
   lower = y;
   t = 0;
end;
else do;
   upper=.;
   lower=.;
   t=t+1;
end;
positive = y;
negative = &amp;amp;THRESHOLD;
;
output;
end;
run;

ods path(prepend) work.templat(update);
proc template;
   define style mystyle;
   parent=styles.sasweb;
      class graphwalls /
            frameborder=off;
      class graphbackground /
            color=white;
   end;
run;

ods listing close;
ods html style=mystyle path='.' file='newgraph.html';
ods graphics / reset=all border=off width=600px height=400px imagename="cdh2";
proc print data=wave; run;
proc sgplot data=wave noautolegend;

YAXIS  DISPLAY=NONE  LABEL = " "  ;
XAXIS   DISPLAY=NONE LABEL = " "  ;
band x=x lower=&amp;amp;THRESHOLD
upper=positive / transparency=0.5;
band x=x lower=negative
upper=&amp;amp;THRESHOLD /
transparency=0.5;
series x=x y=y2 / smoothconnect lineattrs=(color=blue thickness=3);
highlow x=x high=upper low=lower / type=bar highcap=filledarrow intervalbarwidth=30px;
title " ";
footnote "";
run;

ods html close;
ods listing;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 17:53:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-SAS-create-the-attached-the-shapes-of-curvers/m-p/508434#M17310</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-10-29T17:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can SAS create the attached the shapes of curvers?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-SAS-create-the-attached-the-shapes-of-curvers/m-p/508512#M17318</link>
      <description>&lt;P&gt;Thank to Dan for the great progress made so far. Now I understander how to put the 3 things together.&lt;/P&gt;&lt;P&gt;But if I want to make the graph more look like the&amp;nbsp;attached graph from my&amp;nbsp;initial post,&amp;nbsp;my challenge is to figure out on how to create the data to form the curves in order to achieve the desired results&amp;nbsp;since the curves are not symmetric.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm really apprecitive of any helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ethan&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 20:57:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-SAS-create-the-attached-the-shapes-of-curvers/m-p/508512#M17318</guid>
      <dc:creator>t75wez1</dc:creator>
      <dc:date>2018-10-29T20:57:05Z</dc:date>
    </item>
  </channel>
</rss>

