How to remove specific axis labels not the nimor ticks from a MATLAB figure?

7 views (last 30 days)
Hi all, I want to remove few Xlabels but I do not want to miss the ticks. Please see the attached png generated in MATLAB. From X-axis I want to remove 10^-9, 10^-7, 10^-5, 10^-3, 10^-1 to make the figure clearer. Thanks in advance.

Answers (1)

dpb
dpb on 14 Nov 2017
set(gca,'xtick',10.^[-10:2:0])
For more generic coding set the two limits as variables, say powLo and powHi.
  2 Comments
dpb
dpb on 14 Nov 2017
Edited: dpb on 15 Nov 2017
All the blobs on the axis in your attach graph are minor ticks it would appear. Your combination of number of decades plus font weight/size are such as to make a mess of things--there's simply not enough room to display all that in such large/bold style.
In Matlab HG one doesn't have control over minor ticks other than 'on','off'; whether with the newly-introduced (HG2) axes ruler property there's more granularity of control I don't know; I'm stuck at R2014b that doesn't have that incorporated as yet.

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!