How to add an eguation into my plot?
1 view (last 30 days)
Show older comments
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 Comments
Answers (2)
Jonas
on 21 Apr 2021
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 Comments
Walter Roberson
on 21 Apr 2021
You can text() a label into position, and you can set the Interpreter property of the text() object to 'latex'
0 Comments
See Also
Categories
Find more on Axis Labels in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!