Put overbar and subscript multiple times

26 次查看(过去 30 天)
I have the following legend:
legend('4C_{ACTIVE} - PI_{ACTIVE}','4C_{FIXED} - PI_{FIXED}');
I want to put overbar over the letters PI (not on the subscipt or anywhere else). Can someone suggest how to do this?
Thanks in advance.

采纳的回答

Walter Roberson
Walter Roberson 2019-10-7
h = legend('$4C_{ACTIVE} - \overline{PI}_{ACTIVE}$','$4C_{FIXED} - \overline{PI}_{FIXED}$');
h.Interpreter = 'latex';
  2 个评论
Shipra Jain
Shipra Jain 2019-10-7
Thanks Walter. It works but when I use this the formatting is changed. Can you please also suggest how to remove italics from the legend and make it bold. I tried but it still looks the same.
Thanks,
S
Walter Roberson
Walter Roberson 2019-10-7
Perhaps
h = legend('$\bf{4C_{ACTIVE} - \overline{PI}_{ACTIVE}}$','$\bf{4C_{FIXED} - \overline{PI}_{FIXED}}$')

请先登录,再进行评论。

更多回答(0 个)

类别

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