How can I add additional tics to the x-axis scale in my graph?
Mostra commenti meno recenti
Hello all, I am plotting a graph, and currently the X-axis has a range from 0 seconds to 700 seconds, with tic marks at every 100 second intervals. However, i would like the tics to occur at every 20 seconds. Additionally, is there a graphing tool that will insert vertical lines on the x-axis, so that I could clearly distinguish and highlight the data on the graph between the time inter-valve of say 300s-320s. Any help or suggestions would be very much appreciated. Thanks in advance.
Also, here is the line of code that I used to plot my graph:
plot(Time, Data0(:,1))
Risposta accettata
Più risposte (1)
KL
il 22 Nov 2017
If you're using older version of matlab,
set(gca,'xtick',0:20:700);
and to draw vertical lines,
line([x1 x2],[y1 y2])
2 Commenti
Brittny Freeman
il 22 Nov 2017
Jan
il 23 Nov 2017
+1. This method is reliable, backward compatible and legal.
Do not copy M-files from the toolbox of another Matlab version. Never and under no circumstances. Even if it seems to work.
Categorie
Scopri di più su Startup and Shutdown in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!