<?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: Box plot with two Jitter variables example ? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Box-plot-with-two-Jitter-variables-example/m-p/453826#M15565</link>
    <description>&lt;P&gt;Adding an example graph (drawn by hand, even) would help a lot to understand your question.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Apr 2018 03:40:52 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2018-04-13T03:40:52Z</dc:date>
    <item>
      <title>Box plot with two Jitter variables example ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Box-plot-with-two-Jitter-variables-example/m-p/453773#M15559</link>
      <description>&lt;P&gt;Hello All ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Statistician is looking for something similar to it&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in a single plot, plot changes from Baseline to&amp;nbsp; V1 and&amp;nbsp;V7 stratified by treatment using boxplots that are complemented with jitter to show&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;occurrence (yes,no) of&amp;nbsp;XXX (by jitter shape feature)&lt;/LI&gt;&lt;LI&gt;Prior&amp;nbsp;use of&amp;nbsp;Treat A&amp;nbsp;{yes,no} (by jitter color feature)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;State number of samples available for each visit and treatment arm within the plot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do not have example data to show , I am looking for an example that is similar to this . Can anybody give me an example or reference to existing example ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 21:55:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Box-plot-with-two-Jitter-variables-example/m-p/453773#M15559</guid>
      <dc:creator>_user</dc:creator>
      <dc:date>2018-04-12T21:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: Box plot with two Jitter variables example ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Box-plot-with-two-Jitter-variables-example/m-p/453826#M15565</link>
      <description>&lt;P&gt;Adding an example graph (drawn by hand, even) would help a lot to understand your question.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 03:40:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Box-plot-with-two-Jitter-variables-example/m-p/453826#M15565</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-04-13T03:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: Box plot with two Jitter variables example ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Box-plot-with-two-Jitter-variables-example/m-p/453944#M15569</link>
      <description>&lt;P&gt;Coming up with some rough example data may help even structure the details of your question. As it is I am not sure if we are discusging 4 variables, 12 variables or something in between.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A comment on changing appearance of items in general based on the value of another variable: The typical approach involves a single group variable. So it appears that you would have to reduce the combinations reference here:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;occurrence (yes,no) of&amp;nbsp;XXX (by jitter shape feature)&lt;/P&gt;
&lt;P&gt;Prior&amp;nbsp;use of&amp;nbsp;Treat A&amp;nbsp;{yes,no} (by jitter color feature)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;to a single variable that indicates the combination of shape and color&lt;/P&gt;
&lt;P&gt;Then a DATTRMAP keyed to the value of that single variable could assign the color and marker shape when that variable is used as the group variable&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 15:05:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Box-plot-with-two-Jitter-variables-example/m-p/453944#M15569</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-13T15:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Box plot with two Jitter variables example ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Box-plot-with-two-Jitter-variables-example/m-p/453956#M15570</link>
      <description>&lt;P&gt;All I agree with you all about&amp;nbsp; mock , when I asked the statistician he referred this is in his mind using R code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;p &amp;lt;- ggplot(data = Data, aes(y=Chg To Baseline ,&amp;nbsp; x=&amp;nbsp; VisitBy TRT01 Agroup Factor))&lt;BR /&gt;p + geom_boxplot()&amp;nbsp; +&amp;nbsp; theme_bw() + geom_jitter(aes(colour = &lt;SPAN&gt;Prior&amp;nbsp;use of&amp;nbsp;Treat A&amp;nbsp;{yes,no}&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;, shape= &lt;SPAN&gt;occurrence (yes,no) of&amp;nbsp;XXX&amp;nbsp;&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well not sure I am right or wrong but&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While searching for an Example I came across this example by&amp;nbsp;&lt;SPAN&gt;Sanjay Matange at his location but need to add a second Jitter to it&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2015/12/23/box-plot-with-stat-table-and-markers/#prettyPhoto" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2015/12/23/box-plot-with-stat-table-and-markers/#prettyPhoto&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/files/2015/12/Box_Stat_Scatter.txt" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/files/2015/12/Box_Stat_Scatter.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;data merged;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; set sashelp.heart&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sgplotdata(where=(value ne . and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stat in ('Q1' 'Q3' 'STD')));&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;run;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;proc sgplot data=mergedGroup2;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; label value='STD';&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; format std 5.2 q1 q3 4.1;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; vbox cholesterol / category=deathcause group=sex nooutliers&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nofill grouporder=ascending name='a';&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; scatter x=deathcause y=cholesterol / group=sex groupdisplay=cluster&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;grouporder=ascending jitter&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; markerattrs=(symbol=circlefilled size=5)&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;transparency=0.95 clusterwidth=0.7;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; xaxistable q1 / x=cat class=grp classdisplay=cluster colorgroup=grp location=inside classorder=ascending;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; xaxistable q3 / x=cat class=grp classdisplay=cluster colorgroup=grp location=inside classorder=ascending;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; xaxistable std / x=cat class=grp classdisplay=cluster colorgroup=grp location=inside classorder=ascending;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; xaxis display=(nolabel);&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; keylegend 'a' / linelength=24;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;run;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 15:21:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Box-plot-with-two-Jitter-variables-example/m-p/453956#M15570</guid>
      <dc:creator>_user</dc:creator>
      <dc:date>2018-04-13T15:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Box plot with two Jitter variables example ?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Box-plot-with-two-Jitter-variables-example/m-p/453968#M15571</link>
      <description>&lt;P&gt;Since I don't grok r then that doesn't help me at all.&lt;/P&gt;
&lt;P&gt;Do note that your example uses a single group variable to control appearance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This would create the combinations of values, uses the SASHELP.CLASS data set you should have available.&lt;/P&gt;
&lt;PRE&gt;Proc sql;
   create table groups as
   select distinct sex,age,'JitterGrp' as id, catx('_',sex,age) as value
   from sashelp.class
   ;
quit;&lt;/PRE&gt;
&lt;P&gt;The variables ID and Value are required names for a DATTRMAP data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use a data step to add any discrete attributes you want such as markercolor markersize markersymbol for each of the values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add a variable to your data set for grouping using the same syntax as used to make the value variable.&lt;/P&gt;
&lt;P&gt;Add the Dattrmap= option to SGPLOT or SGPANEL proc statement.&lt;/P&gt;
&lt;P&gt;Use the grouping variable as the GROUP= option and indicate the ATTRID= the value of ID you associate with the group values, JitterGrp above.&lt;/P&gt;
&lt;P&gt;Note that a single Dattrmap dataset may have multiple definitions which is why the ID values&amp;nbsp; and attrid= assignment are required when using this option.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2018 16:01:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Box-plot-with-two-Jitter-variables-example/m-p/453968#M15571</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-13T16:01:03Z</dc:date>
    </item>
  </channel>
</rss>

