How do I annotate my MATLAB figure with arrows?
15 views (last 30 days)
Show older comments
How do I annotate my MATLAB figure with arrows?
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
There are several ways to annotate your figure with arrows:
1. The TEXT command along with the LaTeX command will allow you to place an arrow on your plot. For example, if you wanted to annotate the location of sin(pi/3) on a sine wave, try the following:
x=0:0.1:2*pi % Creating array from 0 to 2pi
y=sin(x) % Creating sine wave
plot(x,y) % Plotting sine wave
text(pi/3,sin(pi/3),'\leftarrow{sin(\pi/3)}') % Annotates sin(pi/3) with a left arrow and text
2. You can use the ARROW function
2. You can use the PLOTEDIT function.
Type the following in the MATLAB Command Window to view the documentation on annotating your figure:
web([docroot '/techdoc/creating_plots/annota18.html#4741'])
0 Comments
More Answers (0)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!