Remove certain ticks on y-axis when plotting?

1 Ansicht (letzte 30 Tage)
cocopuffs
cocopuffs am 14 Aug. 2014
Kommentiert: Ben11 am 14 Aug. 2014
I have a plot that has the y axis: .5 1 1.5 2 2.5 3.5 etc... I want to remove the ticks that have .5 in them, so .5, 1.5, 2.5, and 3.5, etc. so that I am left with a y-axis of 1 2 3 4...
Thanks!

Akzeptierte Antwort

Ben11
Ben11 am 14 Aug. 2014
You can set directly the XTick property as follows:
set(gca,'YTick',1:1:SomeNumber);
  2 Kommentare
cocopuffs
cocopuffs am 14 Aug. 2014
Awesome! Thank you
Ben11
Ben11 am 14 Aug. 2014
great you're welcome!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Line 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!

Translated by