{"id":5860,"date":"2017-09-07T14:40:59","date_gmt":"2017-09-07T19:40:59","guid":{"rendered":"https:\/\/www.kabt.org\/?p=5860"},"modified":"2017-09-07T14:40:59","modified_gmt":"2017-09-07T19:40:59","slug":"plotting-error-bars-in-google-sheets-on-a-scatter-plot","status":"publish","type":"post","link":"https:\/\/www.kabt.org\/?p=5860","title":{"rendered":"Plotting Error Bars in Google Sheets?&#8230;..on a scatter plot????"},"content":{"rendered":"<p class=\"gmail-p3\"><span class=\"gmail-s2\">Robbyn Tuinstra, tri-athlete and AP Bio teacher extraordinaire recently had a question about putting error bars on scatter plot data in Google Sheets.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>Several of us weighed in&#8212;a couple of us suggested it wasn\u2019t possible, a couple of others pointed to a video where custom error bars were placed on a bar graph.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>I mentioned that I had tried before to do this but gave up since I use other tools like Excel, Plotly and various stat programs.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>Still this issue festered for a while and I finally had to try and attack it again.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>I was partially successful.\u00a0<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>I\u2019ll describe what I have discovered but this also provides an opportunity to revisit suggested quantitative goals that the community might want to work towards.<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">First the type of experiment\/data appropriate to this question.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>Last year I produced a series of posts that featured a lengthy coverage of the types of data analysis and model application one might want to consider when doing a very simple lab&#8211;the yeast catalase floating disk lab.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>You can find these posts on the Kansas Association of Biology Teachers Bioblog:<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span><a href=\"https:\/\/www.kabt.org\/2017\/02\/06\/summary-post-for-teaching-quantitative-skills\/\">https:\/\/www.kabt.org\/2017\/02\/06\/summary-post-for-teaching-quantitative-skills\/<\/a><\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">I didn\u2019t use google sheets in these posts but I will here.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>Here is a data table of results that has already been transposed from disk rise time to rate of disk rise in floats per second.<\/span><\/p>\n<p class=\"gmail-p2\"><img decoding=\"async\" src=\"https:\/\/ci4.googleusercontent.com\/proxy\/ZmTAzkFzjK0h_x5W_LNym1JULaFfH1zUTQqsYF7ukmXgEU0LdTElmpEZE5viKRd89z7viKtbFxGTNFCiN3lu_yZk51NTmHwaL-KzOcQnp1zhHwM75j4=s0-d-e1-ft#https:\/\/farm5.staticflickr.com\/4358\/36900748596_4f5d8b58f3_b.jpg\" width=\"562\" height=\"295\" \/><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">This data table is typical of how we might record this types of data.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>In the original postings I talked about how to plot this data and to do a curve fit.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>Here\u2019s one way to plot this data (in excel) using approx. 95% error bars (2 x SEM).<\/span><\/p>\n<p class=\"p1\"><img decoding=\"async\" src=\"https:\/\/ci3.googleusercontent.com\/proxy\/eRQ3brnOK212E-oOQfhDanMkb4g9UOg0JH2khfyY6SCeXT4U6kquwZRSIdZLArRfhFc8UMo25p4Qr8kIzAppsrWfZdFmhF1Bu1TQbyJXK75yrC04Zfg=s0-d-e1-ft#https:\/\/farm6.staticflickr.com\/5540\/29858788844_3d15fc20a4_b.jpg\" width=\"562\" height=\"279\" \/><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">I think this is the type of data and plot that Robbyn was talking about.\u00a0<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>The model for enzyme kinetics is known as the Michaelis-Menten equation and it can be used to fit the data.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>I\u2019m not sure we want to get into that in the AP Bio classroom but perhaps we do.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>Nevertheless, I think we definitely should consider having students at least generate the graph.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>The error bars are nice but I think when it comes to developing student argumentation from evidence that simply plotting all the data points along with the means is sufficient.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>A plot that looks like this in Excel:<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\"><img decoding=\"async\" src=\"https:\/\/ci3.googleusercontent.com\/proxy\/tEwSbNl2JxPXYSXYFKyxUOJkVtm281PscMiKvbey4BZ3CVfY-MyxAFz3Rlit4qRP8oAwUYS88PY9jKUEMjpx6wcKJveT54He8BMAvhsqlFDAJJDsW0U=s0-d-e1-ft#https:\/\/farm6.staticflickr.com\/5591\/30033335313_c0f8d6bde9_b.jpg\" width=\"562\" height=\"241\" \/><br \/>\n<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">How do we do this in Google Sheets?<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">One of the first things to do to make this easier to plot is to change the data table into something like this:<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\"><img decoding=\"async\" src=\"https:\/\/ci4.googleusercontent.com\/proxy\/Ts58FPcYIdO0Zy2ld4zYxChACS5pnk1u5NYlaqIxfoerJk4Kd1xl5iWA8Dtu5c5q8gKSFLvrOnjSaI2l9Za7ORPJQEcJ5n5kPKOqYP25PXN6USDycVE=s0-d-e1-ft#https:\/\/farm5.staticflickr.com\/4342\/36900749016_83308f7120_b.jpg\" width=\"467\" height=\"562\" \/><br \/>\n<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">Note that there is a column for the data points and a separate column for the means. This allows us to plot two dependent variable series on the graph.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>We\u2019ll use this strategy later.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>Note that I have also added a 2 % substrate concentration and a 0% substrate concentration but I have left the rise time blank for these.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>These x variables extend the range of of the x axis when we plot.<span class=\"gmail-Apple-converted-space\">\u00a0<\/span><\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">Select these columns, choose Insert Graph and change to a scatter plot you end up with a plot that looks like this:<\/span><\/p>\n<p class=\"p1\"><img decoding=\"async\" src=\"https:\/\/ci5.googleusercontent.com\/proxy\/MknjWKen31fl0Hslf-cydGD0-9mrhxpJvJd00IPSSQ-PUUGnHn21_S3xzdW7B1zAJaKVi0AkzwGgeswfplT62VaxKhTtLVJBZUTzC0TsgZuYPzfCUxg=s0-d-e1-ft#https:\/\/farm5.staticflickr.com\/4388\/37089212735_8529344dab_b.jpg\" width=\"562\" height=\"404\" \/><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">Here I\u2019ve changed the size and color of the individual data points.<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\"><img decoding=\"async\" src=\"https:\/\/ci6.googleusercontent.com\/proxy\/AbvY_W5RYn01AtrSfOiUeinuQDXcVVo2gbbb70HCungY9Fclg91WYentYGN70OuY8cxt4aVjiiJFOCgqtE3Q7keqAayNCLlJjz6EbVgA3KNPbyU62Cc=s0-d-e1-ft#https:\/\/farm5.staticflickr.com\/4390\/36254010544_2f0f93a802_b.jpg\" width=\"562\" height=\"349\" \/><br \/>\n<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">I won\u2019t go into modifying your lablels, axis titles and titles.<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">Personally, I think this is more than adequate evidence to make the argument about the shape of this curve but I imagine in my classes we\u2019d go for a non-linear curve fit (to help them justify the upper end math classes they are taking)<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">But perhaps, like Robbyn you want to include error bars instead of the data points for each substrate concentration.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>This really doesn\u2019t seem to be possible with simple menu options in Google Sheets.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>(obviously, if you want to get into programming, it would be possible).<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>I did however find this work around.<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">First let\u2019s change the data table again. Lets add a new column that has a calculated 2 x standard error of the means.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>And another new column that includes values for [mean + (2 x SEM)] and [mean &#8211; (2 x SEM).]<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>Now the table looks like this:<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\"><img decoding=\"async\" src=\"https:\/\/ci4.googleusercontent.com\/proxy\/pEUcNsiTngpF273Lb-LzTiCfClIIzcMg_sqshttioar1DV0YKpRDQiZl_m3Ar_Fynm9-PfOWiQcbx6dAVgTCHuECjrb5GKa_XnBlPdTb2U29zDjj2T4=s0-d-e1-ft#https:\/\/farm5.staticflickr.com\/4396\/37089212945_cba493de96_b.jpg\" width=\"477\" height=\"562\" \/><br \/>\n<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">Highlight the entire table, insert a chart BUT here is the thing.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>If you highlight the data and let Google sheets determine the graph type it will pick Line Graph.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>Let it this time.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>That is key to what we need to draw the error bars.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>You get something like this:<\/span><\/p>\n<p class=\"p1\"><img decoding=\"async\" src=\"https:\/\/ci5.googleusercontent.com\/proxy\/ICpb6l-mZ-Z2aJTnNFu7o9gtcM_VXLQr0xXdL7GiJT3qThs0HzKujC1KHIPrltKle8dHph00MmiXCWy6GIoLGNC_b_opxT3DN46j-XUlQ9EaCiUYfYA=s0-d-e1-ft#https:\/\/farm5.staticflickr.com\/4436\/37089213215_9e0aebabc1_b.jpg\" width=\"562\" height=\"343\" \/><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">We have too many variables plotted.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>We don\u2019t need the individual data points now so we\u2019ll get rid of those.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>We will also turn off the plotting of the SEM (but not the plus or minus SEM).<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>Finally, select, use column A for labels (assuming you\u2019ve put your substrate concentrations in column A.<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\"><img decoding=\"async\" src=\"https:\/\/ci6.googleusercontent.com\/proxy\/yciNp4ejjtLBoq30eAlI3Wcu8EUIzlm_a7jFhjgYo1SZXpX_wU2KE0Hyn0_XCjnirZt7siU6knza8hu2iw-Gvm761KyVtaivqk085h6NWKa7SgZHRP0=s0-d-e1-ft#https:\/\/farm5.staticflickr.com\/4363\/36254011104_6876a6b350_b.jpg\" width=\"562\" height=\"336\" \/><br \/>\n<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">Once that is done, we should be down to something that looks like this.<span class=\"gmail-Apple-converted-space\">\u00a0\u00a0<\/span>One variable plotted is the means and along with a line that connect plus 2 x SEM to minus 2 x SEM&#8230;.<\/span><\/p>\n<p class=\"gmail-p2\"><img decoding=\"async\" src=\"https:\/\/ci6.googleusercontent.com\/proxy\/ybSwQkhRforQL2rFXPltOQgKq8z325pEqEOiPkaK0AepWvTQryR7D-4KqJYSevr4s2STtdwLTaa5AlZod4rhzKU-r0xga_jjTgMTEGasTZqKzFtnU6E=s0-d-e1-ft#https:\/\/farm5.staticflickr.com\/4419\/37089504185_e7eb0dea26_b.jpg\" width=\"562\" height=\"349\" \/><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">There you have it&#8212;a work around that works because by default Google sheets treats the blank cells in the plus or minus columns as null data&#8211;not zeros.\u00a0<span class=\"gmail-Apple-converted-space\">\u00a0<\/span><\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">p.s.<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">You can turn off that feature and the graph will look like this:<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\"><img decoding=\"async\" src=\"https:\/\/ci6.googleusercontent.com\/proxy\/JtYwMzUHwHH7uM5p-72BHcahKCv95HjH66YT4fUMgSrZM1vMNbpj5J6sDkO3b5sZqUtxl5JUMZPlivgy9SKSlpiIT4hghfCQcZUGyGYXuObgPnpsMBg=s0-d-e1-ft#https:\/\/farm5.staticflickr.com\/4439\/37089213395_dc6f34e7bb_b.jpg\" width=\"562\" height=\"305\" \/><br \/>\n<\/span><\/p>\n<p class=\"gmail-p3\"><span class=\"gmail-s2\">Obviously not what we want.\u00a0<span class=\"gmail-Apple-converted-space\">\u00a0<\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Robbyn Tuinstra, tri-athlete and AP Bio teacher extraordinaire recently had a question about putting error bars on scatter plot data in Google Sheets.\u00a0\u00a0Several of us weighed in&#8212;a couple of us suggested it wasn\u2019t possible, a couple of others pointed to a video where custom error bars were placed on a bar graph.\u00a0\u00a0I mentioned that I<br \/><a class=\"moretag\" href=\"https:\/\/www.kabt.org\/?p=5860\">+ Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_s2mail":"yes","_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5860","post","type-post","status-publish","format-standard","hentry","category-kabt-news"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.kabt.org\/index.php?rest_route=\/wp\/v2\/posts\/5860","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kabt.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kabt.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kabt.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kabt.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5860"}],"version-history":[{"count":1,"href":"https:\/\/www.kabt.org\/index.php?rest_route=\/wp\/v2\/posts\/5860\/revisions"}],"predecessor-version":[{"id":5861,"href":"https:\/\/www.kabt.org\/index.php?rest_route=\/wp\/v2\/posts\/5860\/revisions\/5861"}],"wp:attachment":[{"href":"https:\/\/www.kabt.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kabt.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kabt.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}