<?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 Can I Change Band Color &amp;quot;Partly&amp;quot; in Band Graph? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464624#M16006</link>
    <description>&lt;P&gt;Hi, Mr. DanH:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;"Grouped Band" Approach, I didn't know, and it seems like good.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But for example, if 19 le X le 20, I couldn't create Band between 19 le X le 20 "accurately", because the data PREDICTED has no value "19". I'm sorry, but I want to create band that expresses specific range "accurately".&lt;/P&gt;&lt;P&gt;And blue band protrudes slightly in my result:(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;</description>
    <pubDate>Thu, 24 May 2018 02:49:11 GMT</pubDate>
    <dc:creator>KentaMURANAKA</dc:creator>
    <dc:date>2018-05-24T02:49:11Z</dc:date>
    <item>
      <title>How Can I Change Band Color "Partly" in Band Graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464279#M15999</link>
      <description>&lt;P&gt;Hi, there:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to analyze data using linear mixed effects model, and creating predicted mean graph with band.&lt;/P&gt;&lt;P&gt;I want to change band color like following code &amp;amp; picture, but I can't find how to do that.&lt;/P&gt;&lt;P&gt;For example, at X between 19.95 and 20.25 accurately, I want to change band color from blue to red.&lt;/P&gt;&lt;P&gt;Please help me. Thank you in advance.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data hospital;
    input hospital physician x y @@;
    datalines;
    1 1 19.4 32.4 1 1 19.3 28.3 1 1 19.2 31.9
    1 2 18.8 18.9 1 2 18.4 20.3 1 2 18.2 21.3
    1 3 19.7 24.8 1 3 20.4 38.6 1 3 20.2 27.4
    1 4 19.3 36.1 1 4 21.7 32.4 1 4 20.8 30.7
    2 1 21.5 31.3 2 1 18.7 28.5 2 1 19.9 20.1
    2 2 18.9 31.8 2 2 18.7 25.1 2 2 19.5 32.9
    2 3 18.7 18.3 2 3 19.4 27.4 2 3 19.5 26.2
    2 4 20.9 28.6 2 4 21.1 29.9 2 4 20.0 16.4
    ;
run;
proc mixed data=hospital alpha=0.1;
    class hospital physician;
    model y=x / ddfm=kr solution outpm=Predicted;
    random int / subject=physician(hospital);
run;
proc sort data=Predicted;
    by x;
run;
proc sgplot data=Predicted;
band x=x lower=Lower upper=Upper / legendlabel="90% CLM";
series x=x y=pred;
scatter x=x y=y;  
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Example.JPG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20712i0DE832075C096777/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Example.JPG" alt="Example.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 05:11:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464279#M15999</guid>
      <dc:creator>KentaMURANAKA</dc:creator>
      <dc:date>2018-05-23T05:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Band Color "Partly" in Band Graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464281#M16000</link>
      <description>&lt;P&gt;Use 2 band plots.&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 05:25:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464281#M16000</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-05-23T05:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Band Color "Partly" in Band Graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464296#M16001</link>
      <description>&lt;P&gt;Hi, Mr. Sanjay:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response, and so sorry for less information.&lt;/P&gt;&lt;P&gt;I already have tried "2 BAND Statements", but I have no idea about what structure PREDICTED dataset should have in this case.&lt;/P&gt;&lt;P&gt;I want to know the best structure.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 07:39:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464296#M16001</guid>
      <dc:creator>KentaMURANAKA</dc:creator>
      <dc:date>2018-05-23T07:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Band Color "Partly" in Band Graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464397#M16003</link>
      <description>&lt;P&gt;You can also take the "grouped band" approach in this case:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data hospital;
    input hospital physician x y @@;
    datalines;
    1 1 19.4 32.4 1 1 19.3 28.3 1 1 19.2 31.9
    1 2 18.8 18.9 1 2 18.4 20.3 1 2 18.2 21.3
    1 3 19.7 24.8 1 3 20.4 38.6 1 3 20.2 27.4
    1 4 19.3 36.1 1 4 21.7 32.4 1 4 20.8 30.7
    2 1 21.5 31.3 2 1 18.7 28.5 2 1 19.9 20.1
    2 2 18.9 31.8 2 2 18.7 25.1 2 2 19.5 32.9
    2 3 18.7 18.3 2 3 19.4 27.4 2 3 19.5 26.2
    2 4 20.9 28.6 2 4 21.1 29.9 2 4 20.0 16.4
    ;
run;
proc mixed data=hospital alpha=0.1;
    class hospital physician;
    model y=x / ddfm=kr solution outpm=Predicted;
    random int / subject=physician(hospital);
run;
proc sort data=Predicted;
    by x;
run;

proc format;
value myfmt 1="Okay"
            2="Critical"
;
run;

data grouped;
set Predicted;
format Areas myfmt.;
if x &amp;gt; 19.95 and x &amp;lt; 20.25 then
   Areas=2;
else
   Areas=1;
run;

proc sgplot data=grouped;
styleattrs datacolors=(lightblue red);
band x=x lower=Lower upper=Upper / group=Areas name="Band";
series x=x y=pred / name="Fit" legendlabel="Fit, with 90% CLM";
scatter x=x y=y;
keylegend "Fit" / position=bottomleft;
keylegend "Band" / position=bottomright;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 May 2018 14:33:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464397#M16003</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-05-23T14:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Band Color "Partly" in Band Graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464624#M16006</link>
      <description>&lt;P&gt;Hi, Mr. DanH:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;"Grouped Band" Approach, I didn't know, and it seems like good.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But for example, if 19 le X le 20, I couldn't create Band between 19 le X le 20 "accurately", because the data PREDICTED has no value "19". I'm sorry, but I want to create band that expresses specific range "accurately".&lt;/P&gt;&lt;P&gt;And blue band protrudes slightly in my result:(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 02:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464624#M16006</guid>
      <dc:creator>KentaMURANAKA</dc:creator>
      <dc:date>2018-05-24T02:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Band Color "Partly" in Band Graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464654#M16010</link>
      <description>&lt;P&gt;Hi Kenta, as i understand you need to have youe band changing at 19 even if there are noe real observations there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The trick will be to make a new variable that always has the values that you need. The way to do that would be to predict your band making certain 19 is a value in the band. Some manipulation in setting missing and values at the right points are needded to make the graph look good.&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 07:59:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464654#M16010</guid>
      <dc:creator>PaalNavestad</dc:creator>
      <dc:date>2018-05-24T07:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Band Color "Partly" in Band Graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464669#M16012</link>
      <description>&lt;P&gt;Hi, PaalNavestad:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;Thanks for your opinion, I got one idea, and I accomplished my objective.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; data hospital;
    input hospital physician x y @@;
    datalines;
    1 1 19.4 32.4 1 1 19.3 28.3 1 1 19.2 31.9
    1 2 18.8 18.9 1 2 18.4 20.3 1 2 18.2 21.3
    1 3 19.7 24.8 1 3 20.4 38.6 1 3 20.2 27.4
    1 4 19.3 36.1 1 4 21.7 32.4 1 4 20.8 30.7
    2 1 21.5 31.3 2 1 18.7 28.5 2 1 19.9 20.1
    2 2 18.9 31.8 2 2 18.7 25.1 2 2 19.5 32.9
    2 3 18.7 18.3 2 3 19.4 27.4 2 3 19.5 26.2
    2 4 20.9 28.6 2 4 21.1 29.9 2 4 20.0 16.4
    ;
run;
proc mixed data=hospital;
    class hospital physician;
    model y=x / ddfm=kr solution outpm=Predicted alpha=.1 alphap=.1;
    random int / subject=physician(hospital);
    store mixed;
run;
data new;
    input x @@;
    datalines;
    19 20
    ;
run;
proc plm source=mixed alpha=.1;
    score data=new out=stat lclm=lower uclm=upper;
run;
data predicted_1;
    set predicted(where=(19 le x le 20))
        stat;
    keep x lower upper;
    rename x=x1 lower=lower1 upper=upper1;
run;
proc sql;
    create table work.predicted_2 as
    select a.*, b.*
    from work.predicted as a
         full join
         work.predicted_1 as b
         on a.x eq b.x1;
quit;
proc sort data=predicted_2;
    by x;
run;
proc sgplot data=Predicted_2;
band x=x lower=Lower upper=Upper / legendlabel="90% CLM" fillattrs=(color=blue);
band x=x1 lower=lower1 upper=upper1 / legendlabel="xxxxx" fillattrs=(color=red);
series x=x y=pred;
scatter x=x y=y;  
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I predicted for new observation by using STORE statement &amp;amp; PLM Procedure.&lt;/P&gt;&lt;P&gt;Thank you, everyone!! I did it!!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="didit.JPG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20739iF40768DA837CB407/image-size/medium?v=v2&amp;amp;px=400" role="button" title="didit.JPG" alt="didit.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 09:40:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464669#M16012</guid>
      <dc:creator>KentaMURANAKA</dc:creator>
      <dc:date>2018-05-24T09:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Band Color "Partly" in Band Graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464672#M16013</link>
      <description>&lt;P&gt;Glad it worked. Another idea would be to use a block plot to mark the areo interest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That would create areas of different shades across the whole plot region. The documentation show good examples of how it works.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 09:44:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464672#M16013</guid>
      <dc:creator>PaalNavestad</dc:creator>
      <dc:date>2018-05-24T09:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Band Color "Partly" in Band Graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464673#M16014</link>
      <description>&lt;P&gt;Also so nice of you showing with an example how you solved it.&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 09:50:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464673#M16014</guid>
      <dc:creator>PaalNavestad</dc:creator>
      <dc:date>2018-05-24T09:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Change Band Color "Partly" in Band Graph?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464676#M16016</link>
      <description>&lt;P&gt;Hi, PaalNavestad:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;I searched BLOCK statement in SGPLOT.&lt;/P&gt;&lt;P&gt;I don't want figure like rectangular block now, but I thank you for advice.&lt;/P&gt;&lt;P&gt;Anyway, thank you!!&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 09:56:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-Can-I-Change-Band-Color-quot-Partly-quot-in-Band-Graph/m-p/464676#M16016</guid>
      <dc:creator>KentaMURANAKA</dc:creator>
      <dc:date>2018-05-24T09:56:23Z</dc:date>
    </item>
  </channel>
</rss>

