<?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: Modifying subset of data in SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Modifying-subset-of-data-in-SGPLOT/m-p/595934#M18959</link>
    <description>&lt;P&gt;I was thinking about my response on my way home from work, and I realized I had made a mistake -- GROUPMS is for marker SYMBOL, not marker SIZE. Therefore you can change the marker shape at the end, but not its size. The ATTRMAP needs to change to use MARKERSYMBOL instead of MARKERSIZE. Again, untested, the code would look something like the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data myattrmap;
retain id "myid";
length marker symbol $ 14;
input value $ markersymbol $;
cards;
0 circlefilled
1 trianglefilled
2 trianglefilled
;
run;


proc sgplot data=sasdata.plots dattrmap=myattrmap;
styleattrs datacontrastcolors=(red green black blue) datalinepatterns=(solid shortdash mediumdash longdash);
series x=day y=var / markers groupmc=group_id groupms=sample msattrid=myid grouplc=group_id 
       group=subject_id lineattrs=(pattern=solid) tip=(animal_id group_id) transparency=.4;
series x=day y=var_mean / group=group_id grouplc=group_id lineattrs=(thickness=3) name="mean";
xaxis values=(-7 0 3 6 9 12 15 18 21 24 28);
where sample in (0,1,2);
keylegend "mean" / type=linecolor title='';
title 'Group Means and Individual Lines, All Samples';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 12 Oct 2019 01:34:48 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2019-10-12T01:34:48Z</dc:date>
    <item>
      <title>Modifying subset of data in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Modifying-subset-of-data-in-SGPLOT/m-p/595897#M18956</link>
      <description>&lt;P style="background-color: transparent; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;I am creating a plot with both the series and scatter statements. The x-axis is a time variable and the y are numeric values. The final timepoint can occur at different times for each subject. For the scatter plot, I would like the final value to be larger and darker than the others. Is there a way to do this?&lt;/P&gt;
&lt;P style="background-color: transparent; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background-color: transparent; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;The data are in a long format, with one record for each time point per subject, and there are five subjects in each of four groups. The variable "sample" is what indicates whether or not the value is the final value (1 or 2 being the final, while 0 is all other times).&amp;nbsp;&lt;/P&gt;
&lt;P style="background-color: transparent; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE style="background-color: #eaeaea; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-x: scroll; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; word-wrap: normal; padding: 5px; margin: 0px 10px 10px 10px; border: 1px dotted #999999;"&gt;&lt;CODE class=" language-sas" style="font-style: normal; font-weight: 400;"&gt;proc sgplot data=sasdata.plots;
styleattrs datacontrastcolors=(red green black blue) datalinepatterns=(solid shortdash mediumdash longdash);
series x=day y=var / grouplc=group_id group=subject_id lineattrs=(pattern=solid) tip=(animal_id group_id) transparency=.4;
scatter x=day y=var / group=group_id markerattrs=(symbol=circlefilled size=5) transparency=.4;
series x=day y=var_mean / group=group_id grouplc=group_id lineattrs=(thickness=3) name="mean";
xaxis values=(-7 0 3 6 9 12 15 18 21 24 28);
where sample in (0,1,2);
keylegend "mean" / type=linecolor title='';
title 'Group Means and Individual Lines, All Samples';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P style="background-color: transparent; color: #333333; font-family: &amp;amp;quot; helevticaneue-light&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,helvetica,arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 21:22:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Modifying-subset-of-data-in-SGPLOT/m-p/595897#M18956</guid>
      <dc:creator>jwestra84</dc:creator>
      <dc:date>2019-10-11T21:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying subset of data in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Modifying-subset-of-data-in-SGPLOT/m-p/595902#M18957</link>
      <description>&lt;P&gt;The color change is a problem because all of your colors are already bound to group_id. However, you might be able to change the size using an attrmap. Try my code below (untested) and see if that gets you any closer to what you want.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data myattrmap;
retain id "myid";
input value $ markersize;
cards;
0 5
1 9
2 9
;
run;


proc sgplot data=sasdata.plots dattrmap=myattrmap;
styleattrs datacontrastcolors=(red green black blue) datalinepatterns=(solid shortdash mediumdash longdash);
series x=day y=var / markers groupmc=group_id groupms=sample msattrid=myid grouplc=group_id 
       group=subject_id lineattrs=(pattern=solid) tip=(animal_id group_id) transparency=.4;
series x=day y=var_mean / group=group_id grouplc=group_id lineattrs=(thickness=3) name="mean";
xaxis values=(-7 0 3 6 9 12 15 18 21 24 28);
where sample in (0,1,2);
keylegend "mean" / type=linecolor title='';
title 'Group Means and Individual Lines, All Samples';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Oct 2019 21:48:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Modifying-subset-of-data-in-SGPLOT/m-p/595902#M18957</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-10-11T21:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying subset of data in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Modifying-subset-of-data-in-SGPLOT/m-p/595916#M18958</link>
      <description>&lt;P&gt;Or in your data preparation and another Y value variable &lt;STRONG&gt;only&lt;/STRONG&gt; for the last time point and use another scatter statement.&lt;/P&gt;
&lt;P&gt;Then plot with different symbol size option and denser transparency setting. 0 might be better but I don't have your data to test with.&lt;/P&gt;
&lt;PRE&gt;scatter x=day y=othvar / group=group_id markerattrs=(symbol=circlefilled size=7) transparency=0.1;
&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Oct 2019 22:52:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Modifying-subset-of-data-in-SGPLOT/m-p/595916#M18958</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-10-11T22:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying subset of data in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Modifying-subset-of-data-in-SGPLOT/m-p/595934#M18959</link>
      <description>&lt;P&gt;I was thinking about my response on my way home from work, and I realized I had made a mistake -- GROUPMS is for marker SYMBOL, not marker SIZE. Therefore you can change the marker shape at the end, but not its size. The ATTRMAP needs to change to use MARKERSYMBOL instead of MARKERSIZE. Again, untested, the code would look something like the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data myattrmap;
retain id "myid";
length marker symbol $ 14;
input value $ markersymbol $;
cards;
0 circlefilled
1 trianglefilled
2 trianglefilled
;
run;


proc sgplot data=sasdata.plots dattrmap=myattrmap;
styleattrs datacontrastcolors=(red green black blue) datalinepatterns=(solid shortdash mediumdash longdash);
series x=day y=var / markers groupmc=group_id groupms=sample msattrid=myid grouplc=group_id 
       group=subject_id lineattrs=(pattern=solid) tip=(animal_id group_id) transparency=.4;
series x=day y=var_mean / group=group_id grouplc=group_id lineattrs=(thickness=3) name="mean";
xaxis values=(-7 0 3 6 9 12 15 18 21 24 28);
where sample in (0,1,2);
keylegend "mean" / type=linecolor title='';
title 'Group Means and Individual Lines, All Samples';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 12 Oct 2019 01:34:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Modifying-subset-of-data-in-SGPLOT/m-p/595934#M18959</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-10-12T01:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying subset of data in SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Modifying-subset-of-data-in-SGPLOT/m-p/596531#M18964</link>
      <description>&lt;P&gt;Thanks, Dan. This code worked to change the symbols for the values I needed. The difference wasn't quite as visible as I had hoped. I ended up using a bubble statement &lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;(with the bubble size in a new variable, sampsize)&lt;/SPAN&gt; instead to show the difference in sizes, which made the difference much more noticeable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;bubble x=day y=var size=sampsize / group=group_id BRADIUSMAX=5 BRADIUSMIN=2 COLORMODEL=(red green black blue) COLORRESPONSE=group_id nooutline;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Oct 2019 14:07:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Modifying-subset-of-data-in-SGPLOT/m-p/596531#M18964</guid>
      <dc:creator>jwestra84</dc:creator>
      <dc:date>2019-10-15T14:07:52Z</dc:date>
    </item>
  </channel>
</rss>

