How can I have ALL minor tickmarks and use 'alphadata' in the same plot?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
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!
Answers (1)
Jan
on 11 Jul 2011
1 vote
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])".
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!