How to draw a vertical line at certain x values on a plot
조회 수: 3 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
채택된 답변
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))
댓글 수: 2
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Scatter Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!