how to shift a subscript upwards in Matlab plot legend?

6 ビュー (過去 30 日間)
Amro Alsabbagh
Amro Alsabbagh 2022 年 6 月 20 日
コメント済み: Jan 2023 年 3 月 5 日
I have "V_c" in the legend of a figure. However, the subcript "c" is far from "V". Could you please guide me how to make "c" closer to "V", in other words shift it up a little as below?
  2 件のコメント
Thomas Alberts
Thomas Alberts 2023 年 3 月 4 日
Why doesn't this work in Bode plots:
legend('$Bandpass$','$Highpass$','$Lowpass$','$f_{l}$','$f_{h}$','$f_{m}$', ...
'Interpreter', 'latex')
Jan
Jan 2023 年 3 月 5 日
@Thomas Alberts: Please do not attach a new question as comment to a similar question. Create a new thread instead.
Provide a minimal working example and mention the Matlab version there. This is working as expected for me under R2018b:
plot(1:10, rand(6, 10))
legend('$Bandpass$','$Highpass$','$Lowpass$','$f_{l}$','$f_{h}$','$f_{m}$', ...
'Interpreter', 'latex')

サインインしてコメントする。

回答 (1 件)

Jan
Jan 2022 年 6 月 20 日
編集済み: Jan 2022 年 6 月 20 日
plot(1:10)
legend('$V_c$', 'Interpreter', 'latex', 'FontSize', 15)
figure
plot(1:10)
legend('$V_{\raisebox{1ex}{c}}$', 'Interpreter', 'latex', 'FontSize', 15)
  1 件のコメント
Amro Alsabbagh
Amro Alsabbagh 2022 年 6 月 20 日
Thank you verym much. Could you please guide me how to allign the frame of legend to be on the frame of the plot (i.e., edges on edges)?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLegend についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by