How to make invisible only a part of an axis?

1 view (last 30 days)
Sim on 23 Aug 2021
Commented: Sim on 25 Aug 2021
Hi, I would like to make invisible just a part of an axis. Is it possible? If Yes, how?

Accepted Answer

dpb on 23 Aug 2021
Edited: dpb on 25 Aug 2021
Not really any way piecewise, no. The axis color is one property as is 'Visible' either {'on','off'}
Best could do that I can think of builtin would be to set
that would leave the axis line but eliminate the extra tick labels/ticks.
Only way I can think of to get the full effect would be to set 'Visible','off' for the X axis and then draw the line and ticks manually; doable but a pain.
OK, the following does work although you may need to use a slightly heavier line width than default to avoid a few speckles being left...
hold on
hL3=plot3([0.8 1],[0.5 0.5],[0.5 0.5],'w-');
Sim on 25 Aug 2021
Yes yes, I adjusted my code with the xticks I needed... Very cool solution, I am very thankful! :)

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!