<?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 make jitter look more within boxplot area on proc sgplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893680#M24097</link>
    <description>&lt;P&gt;Type=DISCRETE unfortunately didn't work. I wish the jitter would look like proc sgpanel:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="orchid_sugar_0-1694478842512.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/87789i0D69E8C7E3F2CCAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="orchid_sugar_0-1694478842512.png" alt="orchid_sugar_0-1694478842512.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Where would the style statement be under? Example code would be appreciated. Thank you.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Sep 2023 00:34:22 GMT</pubDate>
    <dc:creator>orchid_sugar</dc:creator>
    <dc:date>2023-09-12T00:34:22Z</dc:date>
    <item>
      <title>How to make jitter look more within boxplot area on proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893662#M24095</link>
      <description>&lt;P&gt;How can I make jitter look more within boxplot area on proc sgplot?&lt;/P&gt;&lt;P&gt;I can see some data points are going into the other group.&lt;/P&gt;&lt;P&gt;Also, is there a way to change the color of boxplot to&amp;nbsp;color blind friendly palette?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="orchid_sugar_0-1694472241809.png" style="width: 514px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/87787i0E423C11437BA3C7/image-dimensions/514x206?v=v2" width="514" height="206" role="button" title="orchid_sugar_0-1694472241809.png" alt="orchid_sugar_0-1694472241809.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sgplot data=ratio_long;
	vbox ratio / category = x group = FacilityType
		whiskerattrs=(thickness=0)nooutliers nomean fillattrs=(transparency=0.7)
		medianattrs=(thickness=5);

	scatter x=x y=y/group=FacilityType groupdisplay=cluster jitter
		markerattrs=(symbol=CircleFilled size=4) transparency = 0.5;

	keylegend / title = 'Facility Type' position=bottom;
	yaxis grid values=(0 to 1.1 by 0.1);
	xaxis display=(nolabel);
	refline 1 / axis=y lineattrs=(pattern=shortdash color=green);
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Sep 2023 22:46:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893662#M24095</guid>
      <dc:creator>orchid_sugar</dc:creator>
      <dc:date>2023-09-11T22:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to make jitter look more within boxplot area on proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893678#M24096</link>
      <description>&lt;P&gt;I don't have your data to try this, but what do you get if you add TYPE=DISCRETE to the XAXIS statement? &amp;nbsp;As for the style, try "illuminate" as a light-based style and see if works for you better. Also, try "Ignite" (dark-based) and "HighContrast" as alternatives.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 00:24:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893678#M24096</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2023-09-12T00:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to make jitter look more within boxplot area on proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893680#M24097</link>
      <description>&lt;P&gt;Type=DISCRETE unfortunately didn't work. I wish the jitter would look like proc sgpanel:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="orchid_sugar_0-1694478842512.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/87789i0D69E8C7E3F2CCAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="orchid_sugar_0-1694478842512.png" alt="orchid_sugar_0-1694478842512.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Where would the style statement be under? Example code would be appreciated. Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 00:34:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893680#M24097</guid>
      <dc:creator>orchid_sugar</dc:creator>
      <dc:date>2023-09-12T00:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to make jitter look more within boxplot area on proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893682#M24098</link>
      <description>&lt;P&gt;Jittering should work similarly between SGPLOT and SGPANEL. Is there any difference in the data used between the two procedures? or in the variable specifications?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for the style, use the STYLE option on the ODS destination, for example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods html style=illuminate;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 00:46:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893682#M24098</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2023-09-12T00:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to make jitter look more within boxplot area on proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893700#M24099</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/435788"&gt;@orchid_sugar&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Type=DISCRETE unfortunately didn't work. I wish the jitter would look like proc sgpanel:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="orchid_sugar_0-1694478842512.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/87789i0D69E8C7E3F2CCAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="orchid_sugar_0-1694478842512.png" alt="orchid_sugar_0-1694478842512.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Where would the style statement be under? Example code would be appreciated. Thank you.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you want something closer to this then you should include the code used for this graph as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried the JITTERWIDTH= option?&lt;/P&gt;
&lt;P&gt;Here is an example with a data set you should have so you can test this code. This is loosely similar to your graph as it is a grouped overlay of scatter over vbox but has a great many collisions in the the Y variable.&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=sashelp.heart;
  vbox cholesterol / category=weight_status group=sex;
  scatter x=weight_status y=systolic / group=sex
     groupdisplay=cluster jitter
    jitterwidth= 1.5;

run;&lt;/PRE&gt;
&lt;P&gt;Run this. Then change the JITTERWIDTH= to 0.5&amp;nbsp;&amp;nbsp; is that what you are requesting?&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=sashelp.heart;
  vbox cholesterol / category=weight_status group=sex;
  scatter x=weight_status y=systolic / group=sex
     groupdisplay=cluster jitter
    jitterwidth= 1.5;

run;&lt;/PRE&gt;
&lt;P&gt;The default for Jitterwidth is 0.85. So any positive value&amp;nbsp; less than 0.85 will make the width of the scatter less, larger will be wider.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 06:24:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893700#M24099</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-09-12T06:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to make jitter look more within boxplot area on proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893746#M24100</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.heart(obs=2000);
	vbox weight / category =Smoking_Status  group = BP_Status groupdisplay=cluster clusterwidth=1
		whiskerattrs=(thickness=0) nooutliers nomean fillattrs=(transparency=0.7)
		medianattrs=(thickness=5) name='x';

	scatter x=Smoking_Status y=weight/group=BP_Status groupdisplay=cluster clusterwidth=1 jitter
		markerattrs=(symbol=CircleFilled size=4) transparency = 0.5;

	keylegend 'x' / title = 'Facility Type' position=bottom;
	xaxis colorbands=odd;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1694518856568.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/87799iDD0A4FC415D5E114/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1694518856568.png" alt="Ksharp_0-1694518856568.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 11:40:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893746#M24100</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-09-12T11:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to make jitter look more within boxplot area on proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893813#M24101</link>
      <description>&lt;P&gt;I really like the image you posted, but the code didn't work for me:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="orchid_sugar_2-1694531108055.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/87815i777478EA5310874E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="orchid_sugar_2-1694531108055.png" alt="orchid_sugar_2-1694531108055.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;ods graphics on / width=10in height=5in;
proc sgplot data=ratio_long;
	vbox y / category = x group = FacilityType groupdisplay=cluster clusterwidth=1
		whiskerattrs=(thickness=0)nooutliers nomean fillattrs=(transparency=0.7)
		medianattrs=(thickness=5) name='x';

	scatter x=x y=y/group=FacilityType2019 groupdisplay=cluster clusterwidth=1 jitter
		markerattrs=(symbol=CircleFilled size=4) transparency = 0.5;

	keylegend 'x'/ title = 'Facility Type' position=bottom;
	yaxis grid values=(0 to 1.1 by 0.1);
	xaxis display=(nolabel) colorbands=odd;
	refline 1 / axis=y lineattrs=(pattern=shortdash color=green);
run;&lt;/PRE&gt;&lt;P&gt;Adjusting the jitterwidth helped but it is off center for some reason:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="orchid_sugar_1-1694531084296.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/87814i0AC88ABBEDB66B5A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="orchid_sugar_1-1694531084296.png" alt="orchid_sugar_1-1694531084296.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;ods graphics on / width=10in height=5in;
proc sgplot data=ratio_long;
	vbox y / category = x group = FacilityType groupdisplay=cluster
		whiskerattrs=(thickness=0)nooutliers nomean fillattrs=(transparency=0.7)
		medianattrs=(thickness=5);

	scatter x=x y=y /group=FacilityType groupdisplay=cluster jitterwidth=0.2 jitter
		markerattrs=(symbol=CircleFilled size=4) transparency = 0.5;

	keylegend / title = 'Facility Type' position=bottom;
	yaxis grid values=(0 to 1.1 by 0.1);
	xaxis display=(nolabel); *colorbands=odd;
	refline 1 / axis=y lineattrs=(pattern=shortdash color=green);
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Sep 2023 15:07:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893813#M24101</guid>
      <dc:creator>orchid_sugar</dc:creator>
      <dc:date>2023-09-12T15:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to make jitter look more within boxplot area on proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893827#M24102</link>
      <description>&lt;P&gt;Data certainly helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is your X variable text or numeric?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think your "off center" is the SCATTER group display= cluster and possibly CLUSTERWIDTH setting related compared with how VBOX separates boxes. Note that on the left side of the cluster, near the blue box, the Scatter points are offset to the left, in the middle for the green box pretty much centered and the right side with the pink(?) box the scatter is offset to the the left though is hard to see as there are very few "pink" points plotted at all.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 15:29:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893827#M24102</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-09-12T15:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to make jitter look more within boxplot area on proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893980#M24103</link>
      <description>x is text and y is numeric</description>
      <pubDate>Wed, 13 Sep 2023 01:41:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/893980#M24103</guid>
      <dc:creator>orchid_sugar</dc:creator>
      <dc:date>2023-09-13T01:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to make jitter look more within boxplot area on proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/894029#M24104</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*
As ballardw said,post your real data,so we can replicate your problem.
Also try "jitter=uniform" "jitterwidht=" option:
*/
proc sgplot data=sashelp.heart(obs=2000);
	vbox weight / category =Smoking_Status  group = BP_Status groupdisplay=cluster clusterwidth=0.8
		whiskerattrs=(thickness=0) nooutliers nomean fillattrs=(transparency=0.7)
		medianattrs=(thickness=5) name='x';

	scatter x=Smoking_Status y=weight/group=BP_Status groupdisplay=cluster clusterwidth=0.8 jitter=uniform jitterwidth=0.5
		markerattrs=(symbol=CircleFilled size=4) transparency = 0.5;

	keylegend 'x' / title = 'Facility Type' position=bottom;
	xaxis colorbands=odd;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1694605059447.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/87869i50CECB7ED5E55D37/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1694605059447.png" alt="Ksharp_0-1694605059447.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 11:37:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/894029#M24104</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-09-13T11:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to make jitter look more within boxplot area on proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/894130#M24110</link>
      <description>&lt;P&gt;This blog post might help:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2019/10/09/sas-championship-golf-plotting-the-results/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2019/10/09/sas-championship-golf-plotting-the-results/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas_golf_championship5.png" style="width: 800px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/87922i09CC61BB88E79B97/image-size/large?v=v2&amp;amp;px=999" role="button" title="sas_golf_championship5.png" alt="sas_golf_championship5.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 18:24:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-make-jitter-look-more-within-boxplot-area-on-proc-sgplot/m-p/894130#M24110</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2023-09-13T18:24:34Z</dc:date>
    </item>
  </channel>
</rss>

