{"id":2705,"date":"2021-11-16T14:14:11","date_gmt":"2021-11-16T14:14:11","guid":{"rendered":"https:\/\/www.psyctc.org\/psyctc\/?post_type=docs&#038;p=2705"},"modified":"2021-11-16T14:18:19","modified_gmt":"2021-11-16T14:18:19","password":"","slug":"jittering","status":"publish","type":"docs","link":"https:\/\/www.psyctc.org\/psyctc\/glossary2\/jittering\/","title":{"rendered":"Jittering"},"content":{"rendered":"\n<p>This is a bit of small print but it&#8217;s such a lovely word &#8230; and such a useful tool to achieve an accurate visual representation of your data in a <a href=\"https:\/\/www.psyctc.org\/psyctc\/glossary2\/scatterplot-scattergram\/\" data-type=\"docs\" data-id=\"2695\">scatterplot<\/a> if you are faced with <a href=\"https:\/\/www.psyctc.org\/psyctc\/glossary2\/overprinting\/\" data-type=\"docs\" data-id=\"2699\">overprinting<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Details<\/h2>\n\n\n\n<p>Here&#8217;s the example from the entry on overprinting.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/scatter1point-1024x1024.png\" alt=\"\" class=\"wp-image-2700\" srcset=\"https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/scatter1point-1024x1024.png 1024w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/scatter1point-300x300.png 300w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/scatter1point-150x150.png 150w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/scatter1point-768x768.png 768w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/scatter1point-1536x1536.png 1536w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/scatter1point.png 1700w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>That&#8217;s plotting 883 observations but only 346 points as there were many participants with the same two scores.  Jittering involves adding a little random shift to observed scores so they don&#8217;t overprint (or at least, overlap rather than superimposing).  You can jitter vertically, horizontally or both.  Here the scores on the x axis, the non-risk scores, are tightly packed at least for the participants scoring zero on the y axis, the risk scale so horizontal jittering isn&#8217;t going to help but what about vertical jittering?<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/jitter1-1024x1024.png\" alt=\"\" class=\"wp-image-2706\" srcset=\"https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/jitter1-1024x1024.png 1024w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/jitter1-300x300.png 300w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/jitter1-150x150.png 150w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/jitter1-768x768.png 768w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/jitter1-1536x1536.png 1536w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/jitter1.png 1700w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>That used both jittering and transparency to handle the overprinting.  It&#8217;s worth a bit of experimenting to get the vertical spread of &#8220;jitter&#8221; sufficient to spread the points but not so much as to obscure any discreteness of scores (we can see the discreteness of the risk scores in the first plot above).  Here jittering alone wasn&#8217;t enough and combination with transparency has probably got a good visual representation of the actual data.<\/p>\n\n\n\n<p>Here&#8217;s a different example (again continuing from the <a href=\"https:\/\/www.psyctc.org\/psyctc\/glossary2\/overprinting\/\" data-type=\"docs\" data-id=\"2699\">overprinting<\/a> entry here).  It&#8217;s from the same dataset: n = 878 with  complete data on CORE-OM items 6 and 27.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_plot1-1024x1024.png\" alt=\"\" class=\"wp-image-2708\" srcset=\"https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_plot1-1024x1024.png 1024w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_plot1-300x300.png 300w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_plot1-150x150.png 150w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_plot1-768x768.png 768w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_plot1-1536x1536.png 1536w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_plot1.png 1700w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This a much easier candidate for jittering.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_jitter1-1024x1024.png\" alt=\"\" class=\"wp-image-2713\" srcset=\"https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_jitter1-1024x1024.png 1024w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_jitter1-300x300.png 300w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_jitter1-150x150.png 150w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_jitter1-768x768.png 768w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_jitter1-1536x1536.png 1536w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_jitter1.png 1700w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Here the challenge was to choose the extent of the jittering to use as much of the space for the 0,0 pair of scores while preserving a gap between the scores to show that they were discrete.  One obvious choice was to use the same amount of jittering on both the x and y axes, reflecting that these are equispaced possible scores.  Here is the same with transparency as well as jittering.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_jitter2-1024x1024.png\" alt=\"\" class=\"wp-image-2714\" srcset=\"https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_jitter2-1024x1024.png 1024w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_jitter2-300x300.png 300w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_jitter2-150x150.png 150w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_jitter2-768x768.png 768w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_jitter2-1536x1536.png 1536w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/items27and6_jitter2.png 1700w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Such is the density in the 0, 0 pair of scores that with this screen area that&#8217;s probably as good a visual representation as one can get of these data.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Try also<\/h4>\n\n\n\n<p><a href=\"https:\/\/www.psyctc.org\/psyctc\/glossary2\/overprinting\/\" data-type=\"docs\" data-id=\"2699\">Overprinting<\/a><br><a href=\"https:\/\/www.psyctc.org\/psyctc\/glossary2\/scatterplot-scattergram\/\" data-type=\"docs\" data-id=\"2695\">Scatterplots<\/a><br>Regression<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Chapters<\/h4>\n\n\n\n<p>Chapter 5.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Local links<\/h4>\n\n\n\n<p>For those using R my &#8220;Rblog&#8221; entry is probably useful (and if you don&#8217;t know R, dipping into it my Rblog <em>might<\/em> tempt you toward it!)<\/p>\n\n\n\n<p><a href=\"https:\/\/www.psyctc.org\/Rblog\/posts\/2021-01-27-handling-overprinting\/\">Handling overprinting<\/a><br>and perhaps the related issue: <a href=\"https:\/\/www.psyctc.org\/Rblog\/posts\/2021-01-27-nudgingonaxes\/\">Nudging groupings on plot axes<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Dates<\/h4>\n\n\n\n<p>Created 16\/11\/21.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a bit of small print but it&#8217;s such a lovely word &#8230; and such a useful tool to achieve an accurate visual representation of your data in a scatterplot if you are faced with overprinting. Details Here&#8217;s the example from the entry on overprinting. That&#8217;s plotting 883 observations but only 346 points as &hellip; <a href=\"https:\/\/www.psyctc.org\/psyctc\/glossary2\/jittering\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Jittering<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[18],"glossaries":[],"doc_tag":[],"knowledge_base":[],"class_list":["post-2705","docs","type-docs","status-publish","hentry","doc_category-om-book"],"year_month":"2026-04","word_count":377,"total_views":"1465","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"chris","author_nicename":"chris","author_url":"https:\/\/www.psyctc.org\/psyctc\/author\/chris\/"},"doc_category_info":[{"term_name":"All OM book glossary entries","term_url":"https:\/\/www.psyctc.org\/psyctc\/glossary\/non-knowledgebase\/om-book\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/docs\/2705","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/comments?post=2705"}],"version-history":[{"count":2,"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/docs\/2705\/revisions"}],"predecessor-version":[{"id":2720,"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/docs\/2705\/revisions\/2720"}],"wp:attachment":[{"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/media?parent=2705"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/doc_category?post=2705"},{"taxonomy":"glossaries","embeddable":true,"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/glossaries?post=2705"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/doc_tag?post=2705"},{"taxonomy":"knowledge_base","embeddable":true,"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/knowledge_base?post=2705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}