{"id":938,"date":"2005-05-01T12:00:12","date_gmt":"2005-05-01T10:00:12","guid":{"rendered":"http:\/\/www.theusrus.de\/blog\/?p=938"},"modified":"2010-12-23T13:53:09","modified_gmt":"2010-12-23T11:53:09","slug":"the-good-the-bad-52005","status":"publish","type":"post","link":"https:\/\/www.theusrus.de\/blog\/the-good-the-bad-52005\/","title":{"rendered":"The Good &amp; the Bad [5\/2005]"},"content":{"rendered":"<div>This month&#8217;s edition is just perfect to show how NOT to do it!<\/p>\n<p><strong>The Bad<\/strong> of the month May is from a <a href=\"http:\/\/www.compstat2004.cuni.cz\/oznameni\/hornik.pdf\">talk<\/a> by Kurt Hornik given at the compstat 2004 meeting in Prague. It looks like follows:<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" title=\"Barley data according to Kurt Hornik's tutorial\" src=\"http:\/\/www.theusRus.de\/Blog-files\/hornik.jpg\" alt=\"\" width=\"511\" height=\"477\" \/><\/p>\n<p>This is the famous barley data used in Bill Cleveland&#8217;s <em>Visualizing Data<\/em> many times.<\/p>\n<p>Well, on a first view we would say it looks good &#8230;<\/p>\n<p>Here is what went wrong with this graphic:<\/p>\n<ol>\n<li>Never use areas to display continuous variables. Continuous values should be plotted along an axis as points or other sensible glyphs.<\/li>\n<li>Use stacked barcharts only for proportions, that add up to a fixed amount (say 100%). Put the least varying class at the bottom of the stack, the more varying clases at the top.<\/li>\n<li>Avoid &#8221;scale hopping&#8221;, i.e. the things that should be compared must be plotted along ONE scale.<\/li>\n<\/ol>\n<p>(Not to mention that the legend messes up the colors &#8230;)<\/p>\n<p>Can you see anything &#8216;out of line&#8217; in the data?<\/p>\n<p>Using the same lattice package in R, we can do much better. Here is <strong>the Good<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" title=\"Barley data in a dotplot\" src=\"http:\/\/www.theusRus.de\/Blog-files\/Points.jpg\" alt=\"\" width=\"313\" height=\"851\" \/><br \/>\nNow we use points, and only have one scale for the whole plot &#8230; and, aha! Somethings wrong with the field in <em>Morris<\/em>.<\/p>\n<p>But talking about this feature and talking about statistical graphics, there is only one very simple and long known plot to display the feature in the data: the <em>Interaction Plot<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" title=\"Interaction plot of the Barley Data\" src=\"http:\/\/www.theusRus.de\/Blog-files\/Interaction.jpg\" alt=\"\" width=\"418\" height=\"416\" \/><\/p>\n<p>The feature we spotted in the data is nothing else than an interaction of the factor <em>year<\/em> for the site <em>Morris<\/em>, which is mostly related to a transcription error.<\/p>\n<p>Going from the first to the third plot, we more and more focus on the &#8216;right&#8217; information, and need less ink to draw it, which nicely corresponds to Tufte&#8217;s <em>data\/ink ratio<\/em>.<\/p>\n<p>Obviously, <em>boxplots<\/em> are another good choice for visualize this kind of data.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This month&#8217;s edition is just perfect to show how NOT to do it! The Bad of the month May is from a talk by Kurt Hornik given at the compstat 2004 meeting in Prague. It looks like follows: This is the famous barley data used in Bill Cleveland&#8217;s Visualizing Data many times. Well, on a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,5],"tags":[],"class_list":["post-938","post","type-post","status-publish","format-standard","hentry","category-general","category-the-good-the-bad"],"_links":{"self":[{"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/posts\/938","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/comments?post=938"}],"version-history":[{"count":2,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/posts\/938\/revisions"}],"predecessor-version":[{"id":940,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/posts\/938\/revisions\/940"}],"wp:attachment":[{"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/media?parent=938"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/categories?post=938"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.theusrus.de\/blog\/wp-json\/wp\/v2\/tags?post=938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}