{"id":36,"date":"2015-01-19T12:27:31","date_gmt":"2015-01-19T19:27:31","guid":{"rendered":"https:\/\/blogs.ubc.ca\/wtamagi\/?p=36"},"modified":"2015-01-19T12:27:31","modified_gmt":"2015-01-19T19:27:31","slug":"histogram-plot-with-axes","status":"publish","type":"post","link":"https:\/\/blogs.ubc.ca\/wtamagi\/2015\/01\/19\/histogram-plot-with-axes\/","title":{"rendered":"Histogram plot with Axes"},"content":{"rendered":"<p>&gt; x &lt;- read.table(&#8220;h:\\\\Altitudes.csv&#8221;,header=F)<br \/>\n&gt; y = x[[1]]\u00a0 # set first column to y<br \/>\n&gt; y<br \/>\n[1] 8848 8611 8586 8511 8463 8201 8167 8163 8125 8091 8068 8047 8035 8012 7885 7852 7820 7816 7815<br \/>\n[20] 7788 7785 7756 7756 7756 7756 7742 7723 7720 7719 7690 7654 7619 7555 7553 7546 7495 7485 7439<br \/>\n[39] 7406 7398 7313 7291 7285 7273 7245 7150 7142 7135 7134 7129\u00a0 # output of values in array<br \/>\n&gt; range(y)\u00a0 # range of values from beginning to end<br \/>\n[1] 7129 8848<br \/>\n&gt; hist(y,breaks=seq(7000,8900,by=(8900-7000)\/7),axes=F,ylim=c(0,20)) # histogram of the frequency of y values classified into the intervals set by breaks.\u00a0 No axis labels and set y-axis range from 0 to 20<br \/>\n&gt; axis(side=1,at=seq(7000,8900,by=round((8900-7000)\/7)))\u00a0 # add x-axis with interval values<br \/>\n&gt; axis(side=2) # add x-axis<br \/>\n&gt;<\/p>\n<p><a href=\"https:\/\/blogs.ubc.ca\/wtamagi\/files\/2015\/01\/histrogram-plot.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-37\" src=\"https:\/\/blogs.ubc.ca\/wtamagi\/files\/2015\/01\/histrogram-plot-296x300.png\" alt=\"histrogram plot\" width=\"296\" height=\"300\" srcset=\"https:\/\/blogs.ubc.ca\/wtamagi\/files\/2015\/01\/histrogram-plot-296x300.png 296w, https:\/\/blogs.ubc.ca\/wtamagi\/files\/2015\/01\/histrogram-plot-624x632.png 624w, https:\/\/blogs.ubc.ca\/wtamagi\/files\/2015\/01\/histrogram-plot.png 645w\" sizes=\"auto, (max-width: 296px) 100vw, 296px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&gt; x &lt;- read.table(&#8220;h:\\\\Altitudes.csv&#8221;,header=F) &gt; y = x[[1]]\u00a0 # set first column to y &gt; y [1] 8848 8611 8586 8511 8463 8201 8167 8163 8125 8091 8068 8047 8035 8012 7885 7852 7820 7816 7815 [20] 7788 7785 7756 7756 7756 7756 7742 7723 7720 7719 7690 7654 7619 7555 7553 7546 7495 7485 [&hellip;]<\/p>\n","protected":false},"author":25150,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-36","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.ubc.ca\/wtamagi\/wp-json\/wp\/v2\/posts\/36","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ubc.ca\/wtamagi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ubc.ca\/wtamagi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ubc.ca\/wtamagi\/wp-json\/wp\/v2\/users\/25150"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ubc.ca\/wtamagi\/wp-json\/wp\/v2\/comments?post=36"}],"version-history":[{"count":1,"href":"https:\/\/blogs.ubc.ca\/wtamagi\/wp-json\/wp\/v2\/posts\/36\/revisions"}],"predecessor-version":[{"id":38,"href":"https:\/\/blogs.ubc.ca\/wtamagi\/wp-json\/wp\/v2\/posts\/36\/revisions\/38"}],"wp:attachment":[{"href":"https:\/\/blogs.ubc.ca\/wtamagi\/wp-json\/wp\/v2\/media?parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ubc.ca\/wtamagi\/wp-json\/wp\/v2\/categories?post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ubc.ca\/wtamagi\/wp-json\/wp\/v2\/tags?post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}