<?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: Please explainh the illogical gradlegend in following example in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Please-explainh-the-illogical-gradlegend-in-following-example/m-p/320255#M11212</link>
    <description>&lt;P&gt;Is your question "If I provide a poorly designed&amp;nbsp;attribute map why does SAS display it as I instructed?" Your actual question is not clear.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any tool has a learning curve. You have learned that the first approach may not be idea for your purpose and not to use it.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Dec 2016 14:55:41 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-12-20T14:55:41Z</dc:date>
    <item>
      <title>Please explainh the illogical gradlegend in following example</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Please-explainh-the-illogical-gradlegend-in-following-example/m-p/320170#M11206</link>
      <description>&lt;P&gt;The folowing code produces the nearly the same results but the gradlegend is completly misleading in the first graph. Can somebody please explain and suggest a solution when uing discrete variable to produce the gradlegend?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class;
 set sashelp.class;
 if weight &amp;lt; 85 then wn=0;
 else wn=1;

run;

data weightdisc;
retain id "wdisc";
length min $ 5 max $ 5;
input min $ max $ color $ altcolor $;
datalines;
0 0    Bio Bio
1 1    bro bro


;
run;

ods graphics on/width=800 px height=600 px;
proc sgplot data=class rattrmap=weightdisc;
	vbar name/ response=Weight colorresponse=wn rattrid=wdisc ;
run;
data weightrange;
retain id "wrange";
length min $ 5 max $ 5;
input min $ max $ color $ altcolor $;
datalines;
0 85    Bio Bio
85 150    bro bro

;
run;
proc sgplot data=class rattrmap=weightrange;
	vbar name/ response=Weight colorresponse=weight rattrid=wrange ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The first result look like this. As can be seen the gradlegend is completly wrong&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/6425i51742BD822AC6BF0/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="discLegend.PNG" title="discLegend.PNG" /&gt;&lt;/P&gt;&lt;P&gt;Second option look like this&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/6426i7C357F38FF7AB799/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Rangelegend.PNG" title="Rangelegend.PNG" /&gt;&lt;/P&gt;&lt;P&gt;As can be seen the legend is logical.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second option can not be used in all cases where you have a process in determing this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are solutions to the problem using attribute map instead. However that usually means using a dummy group variable for vbar and cannot be used for scatter plots.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 10:33:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Please-explainh-the-illogical-gradlegend-in-following-example/m-p/320170#M11206</guid>
      <dc:creator>PaalNavestad</dc:creator>
      <dc:date>2016-12-20T10:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Please explainh the illogical gradlegend in following example</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Please-explainh-the-illogical-gradlegend-in-following-example/m-p/320255#M11212</link>
      <description>&lt;P&gt;Is your question "If I provide a poorly designed&amp;nbsp;attribute map why does SAS display it as I instructed?" Your actual question is not clear.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any tool has a learning curve. You have learned that the first approach may not be idea for your purpose and not to use it.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 14:55:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Please-explainh-the-illogical-gradlegend-in-following-example/m-p/320255#M11212</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-12-20T14:55:41Z</dc:date>
    </item>
  </channel>
</rss>

