Hi there,
See image: I would like to keep the xlabels (M1,M2,M3,M4,All) whilst deleting the xticks. How do I do this?
Thanks

Antworten (1)

Adam
Adam am 9 Mär. 2017

0 Stimmen

hAxes.XAxis.TickLength = [0 0];
where hAxes is your axes handle. This assumes you are using a sufficiently recent version of Matlab (R2015b or later)

2 Kommentare

Jacob
Jacob am 9 Mär. 2017
I've got the 2017 version but that didn't seem to work?
Adam
Adam am 9 Mär. 2017
figure; hAxes = gca;
plot( hAxes, rand( 1, 100 ) )
hAxes.XAxis.TickLength = [0 0];
seems to work fine in R2016a. I don't have R2017, but I don't see why it shouldn't work there also.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Labels and Annotations finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 9 Mär. 2017

Kommentiert:

am 9 Mär. 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by