How to add an eguation into my plot?

1 次查看(过去 30 天)
Hi,
I have plotted my data but I need to add an equation in a textbox near to the lines in my plot. The textbox in the Insert seems to be not suitable as I need to use some symbols like gamma, tetha, alfa etc in the equation and these symbols are not available there. Or maybe I am wrong.
Any advice is appreciated much.

回答(2 个)

Jonas
Jonas 2021-4-21
you can use the annotation command. e.g.
annotation('textbox',[0.1 0.1 0.1 0.1],'String','hello $\frac{2}{4} \alpha$ ','FitBoxToText','on','Interpreter','latex');
there you have any latex command available if you wish. or you use tex as interpreter

Walter Roberson
Walter Roberson 2021-4-21
You can text() a label into position, and you can set the Interpreter property of the text() object to 'latex'

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by