Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Annotations in subplots

Subject: Annotations in subplots

From: CNN

Date: 28 Jul, 2010 19:06:05

Message: 1 of 2

Okay, still new at all this programming. I have 2 sub plots and I'm trying to draw arrows in them. According to the help file, annotation follow normalized units. But the explanation seems to work only for one plot. In my figure how do I make each sub plot the main plot so that I can figure out where to put the arrows because they need to be in specific positions? Or can I get the annotations to work like text so that I can use that axes data to position them? My code for the first plot is below

              plot(N(:,1),M(:,1),'.r','MarkerSize', 3);
              axis([-0.15 0.15 -0.02 0.02])
              ylabel('Transverse position');
              title(['Timestep =', num2str(t(i))]);
              text(-0.06, 0.016, a);
              text(0.06, 0.016, b);
              text(0.1, 0.006, c);
              text(0.1, -0.006, d);
              h1 = gca;
              annotation('arrow',[0.09 0.13],[0.012 0.012]);

Subject: Annotations in subplots

From: Jun

Date: 20 Oct, 2011 19:50:25

Message: 2 of 2

I also want to know the answer.
Seems annotation can only work with the figure, but not axes?

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us