How to include plots in a post?

3 views (last 30 days)
What commands can be used to include plots in a post?
TIA
Greg

Accepted Answer

Azzi Abdelmalek
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
Walter Roberson on 1 Jan 2013
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.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!