How can I write a forward slash in a label

I tried to write forward slash in the label of an axes.
here is the code:
ylabel('\alpha-helix fold induction (TFE / H_2O)')
In the plot it results in a fraction bar. How can I write a forward slash?
I think i as something in common with the _ for the H2O. Because also when i removed the / the label is not nice displayed.

1 commentaire

Image Analyst
Image Analyst le 1 Sep 2015
I'm not sure what you mean. The slash between the E and the H? It's a forward slash for me, see:
Is that not what you want?

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 1 Sep 2015

0 votes

You can use the same technique as for underscores in latex: http://www.mathworks.com/matlabcentral/newsreader/view_thread/54919

3 commentaires

Joas Landis
Joas Landis le 1 Sep 2015
Thanks a lot for this hint. Also good to know. I would like th have the 2 as a index. In the plot it's ok. but after the export to eps the label looks really bad. words over words.
Image Analyst
Image Analyst le 1 Sep 2015
What do you mean by "index"? And can you give an image of how you want it to look, like I did above?
Which MATLAB are you using? There was a similar problem in R2008b for some platforms. If you are using R2014b or later, then possibly http://www.mathworks.com/matlabcentral/answers/159732-2014b-axis-label-errors-when-printing-to-postscript will help.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by