<?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: Customizing Scatterplots with SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Customizing-Scatterplots-with-SGPLOT/m-p/187928#M6931</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan, 9.3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Jan 2014 20:44:54 GMT</pubDate>
    <dc:creator>OPHD1</dc:creator>
    <dc:date>2014-01-03T20:44:54Z</dc:date>
    <item>
      <title>Customizing Scatterplots with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Customizing-Scatterplots-with-SGPLOT/m-p/187926#M6929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking to customize a scatterplot produced with SGPLOT in the following ways:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Highlight specific data points&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A. Highlight one data point in one color&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; B. Highlight a group of data points (not criteria A) in a second color&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; C. Highlight the other points that do not meet criteria A and B in a third color&lt;/P&gt;&lt;P&gt;2. Superimpose two lines -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A. One at a given point on the y axis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B. One at a given point on the x axis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample data is attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1A. Pick one id, for example, AB212, and fill the point one color (e.g. blue)&lt;/P&gt;&lt;P&gt;1B. Since AB212 is a part of group 1, fill all data points in group 1 a second color (e.g. purple)&lt;/P&gt;&lt;P&gt;1C. Every other data point (groups in (2, 3)) , fill a third color (e.g. green)&lt;/P&gt;&lt;P&gt;2A. Create a black line (thin) across the xaxis for the xline value&lt;/P&gt;&lt;P&gt;2B. Create a black line (thin) across the yaxis for the yline value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 20:03:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Customizing-Scatterplots-with-SGPLOT/m-p/187926#M6929</guid>
      <dc:creator>OPHD1</dc:creator>
      <dc:date>2014-01-03T20:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Customizing Scatterplots with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Customizing-Scatterplots-with-SGPLOT/m-p/187927#M6930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What version of SAS do you have?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 20:43:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Customizing-Scatterplots-with-SGPLOT/m-p/187927#M6930</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2014-01-03T20:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Customizing Scatterplots with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Customizing-Scatterplots-with-SGPLOT/m-p/187928#M6931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan, 9.3&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 20:44:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Customizing-Scatterplots-with-SGPLOT/m-p/187928#M6931</guid>
      <dc:creator>OPHD1</dc:creator>
      <dc:date>2014-01-03T20:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Customizing Scatterplots with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Customizing-Scatterplots-with-SGPLOT/m-p/187929#M6932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add the following code to your sample data. Simply change the SELECT_ID macro variable to the ID of interest, and the code will take care of the rest. Let me know if you have any questions about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;BR /&gt;Dan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*-----------------------------------------------------------------------------------------------------------------*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;%let select_id=AB212;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;/* Find the group of interest */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;data _null_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;set test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if (id eq &amp;amp;select_id) then call symput('ACTIVEGROUP', group);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;data plotdata;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;length grpstr $ 15;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;label grpstr="ID";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;set test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;ref_x = .;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;ref_y = .;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if (id eq "&amp;amp;select_id") then do;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; grpstr="&amp;amp;select_id";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; ref_x = x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; ref_y = y;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;else if (group eq symget('ACTIVEGROUP')) then grpstr="In same group";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;else grpstr="In other groups";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;data attrmap;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;retain id "grpmap" markersymbol "circlefilled";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;input value $ 1-15 markercolor $ 16-22;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;cards;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;In other groups green&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;In same group&amp;nbsp;&amp;nbsp; purple&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;_other_&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; blue&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;proc sgplot data=plotdata dattrmap=attrmap;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;scatter x=x y=y / group=grpstr attrid=grpmap;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;refline ref_x / axis=x label;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;refline ref_y / label;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 21:31:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Customizing-Scatterplots-with-SGPLOT/m-p/187929#M6932</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2014-01-03T21:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Customizing Scatterplots with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Customizing-Scatterplots-with-SGPLOT/m-p/187930#M6933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much Dan. I made a few changes and this works perfectly for what I was looking for. I really appreciate it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 14:06:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Customizing-Scatterplots-with-SGPLOT/m-p/187930#M6933</guid>
      <dc:creator>OPHD1</dc:creator>
      <dc:date>2014-01-06T14:06:09Z</dc:date>
    </item>
  </channel>
</rss>

