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

조회 수: 3 (최근 30일)
Vishnu Pendri
Vishnu Pendri 2020년 4월 11일
댓글: Vishnu Pendri 2020년 4월 12일
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.

채택된 답변

Tommy
Tommy 2020년 4월 11일
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))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by