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:
Plot vertical lines on plots

Subject: Plot vertical lines on plots

From: Susan

Date: 6 Jan, 2011 10:42:05

Message: 1 of 2

Hi all,

I wish to plot vertical lines at specific points so that they stand out.

My plot call is as follows:
plot( X, zeros(size(X)),'o', x, y, m, zeros(size(m)),'*'), axis tight;

where x,y etc are my data and 'm' is what is computed. Is there a nice way that I can simply just plot vertical lines at the 'm' data points?

Many thanks

Subject: Plot vertical lines on plots

From: ImageAnalyst

Date: 6 Jan, 2011 10:52:37

Message: 2 of 2

Use ylim to get the maximum extent in the y direction, and then use
the line() function.

Tags for 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