{"id":136,"date":"2007-11-01T16:16:10","date_gmt":"2007-11-01T21:16:10","guid":{"rendered":"https:\/\/blogs.mathworks.com\/desktop\/2007\/11\/01\/adding-annotations-to-graphs\/"},"modified":"2016-04-05T14:17:12","modified_gmt":"2016-04-05T18:17:12","slug":"adding-annotations-to-graphs","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/community\/2007\/11\/01\/adding-annotations-to-graphs\/","title":{"rendered":"Adding annotations to graphs"},"content":{"rendered":"<p>Once you\u2019ve analyzed and plotted your data or results, the next step is often to add the plot to a report or a paper as a document. In many cases you will need to add explanation and annotations to the data to explain its salient features to the reader of your document. The Figure Palette (one of the Plot Tools) let\u2019s you do this by adding and configuring annotations such as arrows, text boxes, and shapes directly to the data in your plot.<\/p>\n<p>To get started, plot your data and open the Figure Palette from the Figure View menu.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone\" src=\"https:\/\/blogs.mathworks.com\/community\/..\/images\/desktop\/figure_palette_view_menu.png\" alt=\"Open the Figure Palette\" width=\"457\" height=\"365\" \/><\/p>\n<p>Now, suppose you want to mark the first point of inflection of the plot and add a comment explaining its meaning. Click on the Text Arrow item in the Annotations section of the Figure Palette (shown on the left), then click on the plot to position the base of the arrow and drag &amp; release to position its head. A cursor at the base of the arrow will show you where to enter text.<\/p>\n<p>&nbsp;<\/p>\n<p>Once the text is entered you can move the arrow and change its orientation by using the positioning handles at the beginning and end of the arrows.<\/p>\n<p>Other arrows and shapes can convey additional information. Suppose you wanted to add a text box explaining the second inflection point and an arrow indicating the time interval between the two inflection points: this could accomplished by copying and pasting the first text arrow and adding a double arrow annotation for time interval.<\/p>\n<p>By default the text box has a black border. You can remove this by double clicking it to open the Property Editor and setting its Line Style to \u201cnone\u201d.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone\" src=\"https:\/\/blogs.mathworks.com\/images\/desktop\/property_editor_text_box_edit.png\" alt=\"Using the Property Editor to Customize the Text Box\" width=\"463\" height=\"370\" \/><\/p>\n<p>Clicking on the double arrow enables you to modify its color and size properties to get the right look.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone\" src=\"https:\/\/blogs.mathworks.com\/images\/desktop\/property_editor_double_arrow.png\" alt=\"Using the Property Editor to Customize the Double Arrow\" width=\"453\" height=\"135\" \/><\/p>\n<p>You can also add lines to draw attention to the left and right extent of the double arrow.<br \/>\nOnce you are finished, you can close the Plot Tools and copy the figure to your document.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone\" src=\"https:\/\/blogs.mathworks.com\/\/images\/desktop\/figure_reservoir.png\" alt=\"Completed Figure\" width=\"463\" height=\"370\" \/><\/p>\n<p>The annotations that you have added and edited have treated the figure very much as a document, combining representations of data with conceptual content (the annotations). Consequently, you may want to save your work product as it evolves. This can be done by saving it as a \u201c.fig\u201d file using the figure \u201cFile\u201d menu or the MATLAB \u201chgsave\u201d function. Saved figures can then be restored using the figure \u201cFile\u201d menu or the MATLAB command \u201chgload\u201d.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Once you\u2019ve analyzed and plotted your data or results, the next step is often to add the plot to a report or a paper as a document. In many cases you will need to add explanation and annotations to&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/community\/2007\/11\/01\/adding-annotations-to-graphs\/\">read more >><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[12],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/136"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/comments?post=136"}],"version-history":[{"count":4,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/136\/revisions"}],"predecessor-version":[{"id":3517,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/136\/revisions\/3517"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/media?parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/categories?post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/tags?post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}