How to include plots in a post?
3 views (last 30 days)
Show older comments
What commands can be used to include plots in a post?
TIA
Greg
Accepted Answer
Azzi Abdelmalek
on 1 Jan 2013
Edited: Azzi Abdelmalek
on 1 Jan 2013
If I have understood your question:
Save your plot as a JPG image then put it in a host server, then post a link containing your file, example:
<<http://mathworks.com/matlabcentral/images/surf.gif>>
1 Comment
Walter Roberson
on 1 Jan 2013
Information about some file servers can be found at http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers
If you are just creating a hyperlink, then use a single "<" before the URL, and then a space and then any descriptive text for the URL, and then end with a single ">". This can be done inside a text paragraph, but the link will not be generated within code sections (indented by two spaces.)
If you want the plot to show up directly in the post, then the URL you use must point directly to an image file, and it must be an http: link and not a https: link. Many of the common file servers give out links that end in "/" -- those do not link directly to an image file and so cannot be used for direct images. googledocs is a notable system that uses https: and so cannot be made to appear directly.
To have a plot appear directly, use the syntax that Azzi uses, with "<<" immediately before and ">>" immediately after. This construct must also be the only thing in the text paragraph and cannot be indented: there must be an empty line before and afterwards.
When you include a plot directly, pay attention to the preview: if the plot does not show up in the preview then there is something wrong and the plot will not be displayed to users at all and no link will be displayed for the plot either. The user will have no way of knowing that a plot was directly included in that situation.
More Answers (0)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!