setting incremental of y axis while plotting using scatter function
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
sermet
am 18 Feb. 2016
Kommentiert: Muhammad Altahhan
am 28 Mär. 2021
I have several vectors for plotting using scatter function. Boundary of X axis is constant like [0:24] so I can set for this boundary with 2 increments like that;
set(gca,'xtick',[0:2:24]);
but boundary of Y axis depends on the vector data. When I plot the vectors, increment of Y axis values seems 5. I need to make this interval more tight like 1. How can I set this interval value with using gca function?
0 Kommentare
Akzeptierte Antwort
the cyclist
am 18 Feb. 2016
I'm not perfectly clear on what you are trying to do, but I think this might help:
ylim = get(gca,'YLim');
set(gca,'YTick',ylim(1):1:ylim(2));
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Scatter Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!