Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
a=[1 2 7 5 4 6] t=0:2:10 plot(t,a);
我希望在 x 轴上的图中只有值:0、2、4、6、8、10(根据代码中的 t=0:2:10)应该在时间轴上描绘,这与上面显示的所有价值观。我该怎么做呢 ?
这些是 xticks,像这样设置它们:
set(gca,'Xtick',0:2:10);
如果你想隐藏 yticks:
set(gca,'Ytick',[]);