<?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 set background colors in sgplot conditioned on both x- and y-values in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-set-background-colors-in-sgplot-conditioned-on-both-x-and/m-p/471365#M16263</link>
    <description>Thanks for the help!</description>
    <pubDate>Tue, 19 Jun 2018 13:44:29 GMT</pubDate>
    <dc:creator>AnnaHawgood</dc:creator>
    <dc:date>2018-06-19T13:44:29Z</dc:date>
    <item>
      <title>How to set background colors in sgplot conditioned on both x- and y-values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-set-background-colors-in-sgplot-conditioned-on-both-x-and/m-p/470598#M16226</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've made&amp;nbsp;the following scatterplot with sgplot and would like to add background colors, so that:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;the top right corner (defined by x&amp;gt;0.75, y&amp;gt;0) is green&lt;/LI&gt;&lt;LI&gt;the bottom left corner (define by x&amp;lt;=0.75, y&amp;lt;=0) is red&lt;/LI&gt;&lt;LI&gt;the top left and bottom right corners (x&amp;lt;=0.75, y&amp;gt;0 and x&amp;gt;0-75, y&amp;lt;0) are yellow&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way of doing this in proc sgplot (I have attached my data as a xlsx-file)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Graph:&lt;/P&gt;&lt;DIV align="center"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Udklip.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21207i7A5B5F59B93E2FEF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Udklip.PNG" alt="Udklip.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title "Lovoverholdelsesprocenter over tid - §50-Undersøgelser";
 proc sgplot data=graf dattrmap=attrmap_bu noborder ;
  where sagstrin ? "2" and 'Med i Baselin'n ne '';
  scatter x=pct_118 y=diff / group=spg attrid=spg;
  styleattrs datacolors=(red yellow green);
  xaxis min=-0 max=1 values=(0 to 1 by 0.1) fitpolicy=rotate valuesrotate=diagonal valueattrs=(Family=Helvetica Size=8) label="Lovoverholdelse 1. kvt./18";
  yaxis min=-0.4 max=0.5 values=(-0.4 to 0.5 by 0.1) valueattrs=(Family=Helvetica Size=8) label="Frem-/tilbagegang ift. 4/17 i procentpoint";
  refline 0 /axis=y;
  refline 0.75 /axis=x;
  *keylegend "underniv" / across=3 noborder valueattrs=(Family=Helvetica Size=7);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 14:04:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-set-background-colors-in-sgplot-conditioned-on-both-x-and/m-p/470598#M16226</guid>
      <dc:creator>AnnaHawgood</dc:creator>
      <dc:date>2018-06-15T14:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to set background colors in sgplot conditioned on both x- and y-values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-set-background-colors-in-sgplot-conditioned-on-both-x-and/m-p/470600#M16227</link>
      <description>&lt;P&gt;If you know the data extents, use POLYGON plot to&amp;nbsp;display the 4 regions you want.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 14:07:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-set-background-colors-in-sgplot-conditioned-on-both-x-and/m-p/470600#M16227</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-06-15T14:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to set background colors in sgplot conditioned on both x- and y-values</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-set-background-colors-in-sgplot-conditioned-on-both-x-and/m-p/471365#M16263</link>
      <description>Thanks for the help!</description>
      <pubDate>Tue, 19 Jun 2018 13:44:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-set-background-colors-in-sgplot-conditioned-on-both-x-and/m-p/471365#M16263</guid>
      <dc:creator>AnnaHawgood</dc:creator>
      <dc:date>2018-06-19T13:44:29Z</dc:date>
    </item>
  </channel>
</rss>

