plotting a figure with specific x axis
1 次查看(过去 30 天)
显示 更早的评论
I have already opened a figure and i want to plot a new figure without being in the old one. For that purpose I want to display the x axis as matrix(:,1) and the y axis as matrix(:4). At the same time I want a vertical dotted line in the new figure when the x axis is a multiple of 60 (60, 120, 180 ....). How will I plot that chart?
0 个评论
采纳的回答
更多回答(1 个)
Walter Roberson
2017-10-12
x = matrix(:,1);
y = matrix(:,4);
plot(x, y);
maxx = max(x);
maxx = 60 * ceil(maxx/60);
xticks = 0 : maxx;
set(gca, 'xtick', xticks, 'xgrid', 'on', 'gridlinestyle', ':')
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!