How can I have ALL minor tickmarks and use 'alphadata' in the same plot?

Hi,
I'd like to have minor tickmarks and use the alphadata option in the same plot. Currently I'm doing something like this:
figure(1)
h1 = imagesc(x,y,c);
set(h1,'alphadata',~isnan(c));
set(gca,'XMinorTick','on'); set(gca,'YMinorTick','on');
This works, except the minor ticks don't extend to the end of the figure: they stop at the last major tick mark. If I remove the 'set(h1,'alphadata',~isnan(c));' line it works perfectly. Why is this the case? Is there a way to include all minor tickmarks in this example?
Thanks!

Réponses (1)

Jan
Jan le 11 Juil 2011
The renderer is changed to OpenGL automatically, if the Alpha-channel is enabled. The OpenGL renderer has several problems and the wrong display of minor tick marks seems to be one of them. I suggest either to ignore it, or to set the axis limits to a major tick manually e.g. by "set(axes, 'XLim', [low, high])".

Cette question est clôturée.

Question posée :

le 9 Juil 2011

Clôturé :

le 20 Août 2021

Community Treasure Hunt

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

Start Hunting!

Translated by