To clear xtick
and xticklabel
from a MATLAB figure, you can set xtick to []
and xticklabel to {}
. Here's an example:
main.m152 chars10 lines
The set
function is used to modify the gca
(get current axis) properties of the figure. By setting xtick
to an empty vector []
, the x-axis tick values are cleared. By setting xticklabel
to an empty cell array {}
, the tick labels are also cleared.
gistlibby LogSnag