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.
0 个评论
回答(2 个)
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
0 个评论
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'
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Axis Labels 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!