Typesetting in a figure legend

3 次查看(过去 30 天)
pxg882
pxg882 2013-1-23
Hi,
I want to be able to write '\bar{u}' and '\bar{\bar{u}}', for example, in the legend of a figure I have produced. Does anybody know how to do this?
The regular TeX code doesn't seem to work.
Thanks

回答(1 个)

John Petersen
John Petersen 2013-1-23
Try this:
h=legend('$\bar{u}$', '$\bar{\bar{u}}$')
set(h,'interpreter','latex')

类别

Help CenterFile Exchange 中查找有关 Legend 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by