Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit:

Disabling printing underscore as subscript in figures

Asked by AP on 11 Jun 2011

Underscores print as subscript in figures. Can I disable it because I want to print the underscores as well.






No products are associated with this question.

1 Answer

Answer by Walter Roberson on 11 Jun 2011
Accepted answer

Set the Interpreter property for that field to 'none'; the default for text() fields is LaTex.


Walter Roberson on 11 Jun 2011

Personally I never count on gco being the object I am interested in.

In the above, gco is likely to be the result of imshow(), but imshow() returns an image object, and image objects do not have a 'text' field.

When you title(), a _new_ text object is created to hold the title. That new text object is not going to inherit the properties of the old one.

I would suggest,

for i = 1:4
title(sprintf('%s_%d',mytitle{i},i), 'Interpreter', 'none');

AP on 11 Jun 2011

You're the best. Thanks.

Jan Simon on 11 Jun 2011

Another method: Replace '_' by '\_' in the string.

Walter Roberson

Contact us