I have a figure and I'd like to be able to show the ticks positions (in white) but keep the tick labels (in black). For example, if you try:
imagesc(abs(peaks(10))); colormap('bone');
set(gca,'XTick',0:pi:2*pi,'XTickLabel',{'0', 'p', '2p'},'fontname','symbol');
You can see that the tick positions can't be seen. Matlab's documentation tells that the handle YColor
and XColor
can be used, but they also control the color of the tick labels. For example:
I have tried to get the tick out, but it doesn't look good. I tried playing with an approach similar to the one discussed here, but without success. The last way I can think of is to "manually" rewrite the labels as text objects... Would appreciate your input.