How to draw a vertical line at certain x values on a plot

3 visualizaciones (últimos 30 días)
Vishnu Pendri
Vishnu Pendri el 11 de Abr. de 2020
Comentada: Vishnu Pendri el 12 de Abr. de 2020
I am creating a timecourse of some EEG data and I would like to create a vertical line that goes from the bottom to the top of the plot to indicate when the cluster ends and starts.

Respuesta aceptada

Tommy
Tommy el 11 de Abr. de 2020
hold on;
plot([x x], ylim)
Or better yet, in case you have multiple sets of axes:
% if ax is the set of axes you are plotting to
hold(ax, 'on');
plot(ax, [x x], ylim(ax))

Más respuestas (0)

Categorías

Más información sobre Scatter Plots en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by