How can I use apostrophe as a text in legend?

58 views (last 30 days)
I want to insert apostrophe in legend for example, "Jane's weight" but MATLAB handles ' as a command.
I tried to use '' but it doesn't work....
  1 Comment
Ayub Ali
Ayub Ali on 7 Dec 2017
If you try disp((sprintf("Jane's weight"))
it should work mate

Sign in to comment.

Accepted Answer

per isakson
per isakson on 7 Apr 2012
Double apostrophe:
legend('Jane''s weight')

More Answers (0)

Community Treasure Hunt

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

Start Hunting!