{"id":6471,"date":"2016-06-23T12:01:18","date_gmt":"2016-06-23T16:01:18","guid":{"rendered":"http:\/\/blog.originlab.com\/?p=6471"},"modified":"2019-11-18T12:32:18","modified_gmt":"2019-11-18T17:32:18","slug":"how-to-plot-jitterchart-with-mean-and-error","status":"publish","type":"post","link":"https:\/\/blog.originlab.com\/ja\/how-to-plot-jitterchart-with-mean-and-error","title":{"rendered":"Plot Jitter Chart with Mean and SE Bar in Origin"},"content":{"rendered":"<p>Jitter chart, called <strong>column scatter<\/strong> in Origin, is a variation of vertical scatter plot which is often used to display individual\u00a0data points.This blog will show how to customize a jitter chart to show data points with mean\u00a0line\u00a0and SE error bars on top.<img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6472 aligncenter\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/preview-image.png\" alt=\"preview image\" width=\"500\" height=\"418\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/preview-image.png 617w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/preview-image-300x251.png 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>The project\u00a0is available to download from <a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/Jitter-with-Mean-and-SE.zip\">here<\/a>. Go to &#8220;Data&#8221; workbook window you will see it has two levels of group. One is\u00a0Control vs Treatment in Long Name header row, the other is Group A, B, C in Comments.<\/p>\n<p>&nbsp;<\/p>\n<p>First, let&#8217;s make a two-level grouped box chart from the data. Highlight Col(A) through Col(F), plot from\u00a0menu <strong>Plot:Categorical: Grouped Box Charts- Raw Data<\/strong>. In the dialog specify group levels according to the data layout, shown as below. Origin provides many types of box charts in the dialog&#8217;s\u00a0<strong>Graph Theme<\/strong> dropdown list. Here we choose <strong>Box_Column Scatter<\/strong>.<\/p>\n<p><em>Hint: the<strong>\u00a0Auto Preview<\/strong>\u00a0on bottom and <strong>Preview<\/strong> tab on the right panel is helpful for\u00a0making selections in the dialog.<\/em><\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/grouped-box-raw-data-dialog.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6481\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/grouped-box-raw-data-dialog.png\" alt=\"grouped box raw data dialog\" width=\"688\" height=\"409\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/grouped-box-raw-data-dialog.png 865w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/grouped-box-raw-data-dialog-300x178.png 300w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/grouped-box-raw-data-dialog-768x456.png 768w\" sizes=\"auto, (max-width: 688px) 100vw, 688px\" \/><\/a><\/p>\n<p>This <strong>Column Scatter\u00a0<\/strong>template<strong>\u00a0<\/strong>plots individual data point as jitter chart but\u00a0only shows\u00a0mean line. The\u00a0other statistics including\u00a0SD, SE, percentiles, outliers etc belong to a box chart component (our document <a href=\"http:\/\/www.originlab.com\/doc\/Origin-Help\/Create-Box-Chart\">here<\/a>\u00a0describes\u00a0how box chart components represent statistics in Origin).\u00a0In order\u00a0to show SE error bars, we\u00a0are going to switch to show both data and box, let whiskers to show as plus and minus one SE, and hide\u00a0interquartile box.<\/p>\n<p>&nbsp;<\/p>\n<p>Double click on the plot, and in the <strong>Plot Details &#8211; Plot Properties<\/strong> dialog\u00a0with the first dataset selected, go to\u00a0<strong>Box<\/strong> tab. First, select\u00a0<strong>Box + Data Overlap<\/strong> from <strong>Type<\/strong> drop-down menu. Once you selected, there will be two additional tabs <strong>Percentile<\/strong> \u3001 <strong>Pattern<\/strong> appeared specifically for customizing the box.<\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/show-box.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6485\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/show-box.png\" alt=\"show box\" width=\"728\" height=\"469\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/show-box.png 918w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/show-box-300x193.png 300w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/show-box-768x494.png 768w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/a><\/p>\n<p>Now the\u00a0Box and Whisker are\u00a0enable to customize and with separate controls. So for\u00a0Box Style\u00a0change to<strong> No Box<\/strong> to hide interquartile, and for whisker choose SE as <strong>Range<\/strong>, and 1 time\u00a0<strong>Coef<\/strong>. We also want to uncheck <strong>Draw Data On Top of Box <\/strong>checkbox so that this special box (only with mean line and whisker) will show on top of the jittered data.<\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/whisker-dialog.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6487\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/whisker-dialog.png\" alt=\"whisker dialog\" width=\"710\" height=\"457\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/whisker-dialog.png 913w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/whisker-dialog-300x193.png 300w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/whisker-dialog-768x495.png 768w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/whisker-dialog-80x50.png 80w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/><\/a><\/p>\n<p>Then go to <strong>Percentile<\/strong> tab,\u00a0uncheck\u00a0all the symbols for percentiles.<\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/percentile.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6488 aligncenter\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/percentile.png\" alt=\"percentile\" width=\"688\" height=\"445\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/percentile.png 909w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/percentile-300x194.png 300w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/percentile-768x497.png 768w\" sizes=\"auto, (max-width: 688px) 100vw, 688px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Then go to <strong>Lines<\/strong> tab. Click the <strong>Whisker<\/strong> style popup and set <strong>Line Color<\/strong> = <em>Black <\/em>\u3001\u00a0<strong>Line Width<\/strong> = <em>2<\/em>. Clear the <strong>Median Line<\/strong> check box (if checked). Click the\u00a0<strong>Mean Line\u00a0\u00a0<\/strong>style popup and set\u00a0<strong>Line Color<\/strong> = <em>Black\u00a0<\/em>\u3001\u00a0<strong>Line Width<\/strong> = <em>2<\/em>.<\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/lines-dialog-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-11194 size-full aligncenter\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/lines-dialog-1.png\" alt=\"\" width=\"659\" height=\"439\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/lines-dialog-1.png 659w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/lines-dialog-1-300x200.png 300w\" sizes=\"auto, (max-width: 659px) 100vw, 659px\" \/><\/a><\/p>\n<p>Click <strong>Apply<\/strong> button on the bottom, and you will see mean and SE bars shows on top of jitter chart with\u00a0customized\u00a0color and width.<\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/draft-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-11198 size-full aligncenter\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/draft-1.png\" alt=\"\" width=\"576\" height=\"469\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/draft-1.png 576w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/draft-1-300x244.png 300w\" sizes=\"auto, (max-width: 576px) 100vw, 576px\" \/><\/a><\/p>\n<p>You can go to <strong>Symbol<\/strong> tab to customize the jitter data shape and color. E.g. Choose <strong>Open<\/strong> for <strong>Interior<\/strong>.<\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/symbol-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-11197 size-full aligncenter\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/symbol-1.png\" alt=\"\" width=\"659\" height=\"510\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/symbol-1.png 659w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/symbol-1-300x232.png 300w\" sizes=\"auto, (max-width: 659px) 100vw, 659px\" \/><\/a><\/p>\n<p>Since it&#8217;s a grouped plot, some formats for example colors, patterns or styles can be customized at once for all the data plots. Here for example the\u00a0symbol color, we can go to <strong>Group<\/strong> tab, and in the table for\u00a0<strong>Symbol Color\u00a0<\/strong>choose <strong>By One<\/strong>\u00a0for\u00a0<strong>Increment<\/strong>. If to\u00a0change color as a group, just click on &#8220;&#8230;&#8221; button on the same row to open increment list and pick colors.<\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/group-dialog-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-11199 size-full aligncenter\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/group-dialog-1.png\" alt=\"\" width=\"661\" height=\"581\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/group-dialog-1.png 661w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/group-dialog-1-300x264.png 300w\" sizes=\"auto, (max-width: 661px) 100vw, 661px\" \/><\/a><\/p>\n<p><em>Hint: There has other useful controls we didn&#8217;t mention in this blog. For example, under <strong>Data<\/strong> tab you can add a distribution curve, change bin settings, and\u00a0choose a\u00a0customized data width instead of Jitter,\u00a0and under <strong>Spacing<\/strong> tab to change gaps between or within subgroups etc.<\/em><\/p>\n<p>Now the data plot part is done. Let&#8217;s customize the bottom axis tick label table to show only Group A, B, C since the Control and Treatment already shows in legend. Double click on text &#8220;Control&#8221; to open Axis dialog, and <strong>Bottom<\/strong> 2 will be selected on the left panel. Right click <strong>Bottom 2<\/strong> and choose <strong>Delete<\/strong>.<\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/delete_bottom2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6506 aligncenter\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/delete_bottom2.png\" alt=\"delete_bottom2\" width=\"412\" height=\"306\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/delete_bottom2.png 496w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/delete_bottom2-300x223.png 300w\" sizes=\"auto, (max-width: 412px) 100vw, 412px\" \/><\/a><\/p>\n<p>For\u00a0Group A, B, C tick label table row (<strong>Bottom1<\/strong>), we can hide vertical frames by unchecking <strong>Inside Border<\/strong> \u3001 <strong>Outside Border.<\/strong>\u00a0Uncheck <strong>Far Parallel Border<\/strong> to hide the table frame at bottom. Check <strong>Gap Between Subgroups\/Subsets<\/strong> to show some gap between Group A, B, C.<\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/bottom1_customization.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6507 aligncenter\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/bottom1_customization.png\" alt=\"bottom1_customization\" width=\"483\" height=\"481\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/bottom1_customization.png 615w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/bottom1_customization-150x150.png 150w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/bottom1_customization-300x300.png 300w\" sizes=\"auto, (max-width: 483px) 100vw, 483px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>The default legend already displays for data plots. To add legend for mean and SE bar, just right click on the legend box and choose <strong>Legend: Box Chart Component<\/strong>. In the open dialog, make sure\u00a0<strong>Whisker<\/strong>,<strong> Mean Line<\/strong> \u3001<strong> Data<\/strong> are checked\u00a0and click OK.<b>\u00a0<\/b><\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/legend-dialog-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-11200 size-full aligncenter\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/legend-dialog-1.png\" alt=\"\" width=\"290\" height=\"516\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/legend-dialog-1.png 290w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/legend-dialog-1-169x300.png 169w\" sizes=\"auto, (max-width: 290px) 100vw, 290px\" \/><\/a><\/p>\n<p>You can hold down <strong>Ctrl<\/strong> key and drag the handles around it to arrange legends in 2 columns, to get something similar as\u00a0Graph1 in the opj file.<\/p>\n<p><a href=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/rearrange_legend.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11201 size-full\" src=\"http:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/rearrange_legend.png\" alt=\"\" width=\"983\" height=\"125\" srcset=\"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/rearrange_legend.png 983w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/rearrange_legend-300x38.png 300w, https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/rearrange_legend-768x98.png 768w\" sizes=\"auto, (max-width: 983px) 100vw, 983px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Jitter chart, called column scatter in Origin, is a variation &hellip; <\/p>","protected":false},"author":16,"featured_media":6516,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[109],"tags":[],"class_list":["post-6471","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-graphing-stats-and-basic-2d"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7DvU2-1Gn","jetpack_likes_enabled":true,"jetpack_featured_media_url":"https:\/\/blog.originlab.com\/wp-content\/uploads\/2016\/06\/jitter_mean_se.png","post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/posts\/6471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/comments?post=6471"}],"version-history":[{"count":36,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/posts\/6471\/revisions"}],"predecessor-version":[{"id":11203,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/posts\/6471\/revisions\/11203"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/media\/6516"}],"wp:attachment":[{"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/media?parent=6471"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/categories?post=6471"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.originlab.com\/ja\/wp-json\/wp\/v2\/tags?post=6471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}