How to draw a vertical line at certain x values on a plot
2 次查看(过去 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!