MATLAB: Problem with transparencies and Windows 7

alphadataimage

I have a problem when I use transparencies with R2008a installed in Windows 7.
For example if I do:
image(rand(500),'AlphaData',0.5)
hold on
plot(50:50:500,50:50:500,'ko','MarkerFaceColor','k')
hold off
The markers do not show any face color when it should be black
Any idea how to solve it without changing my windows?

Best Answer

Try
zoff = eps;
plot3(50:50:500, 50:50:500, zoff + zeros(1,10), 'ko', 'MarkerFaceColor', 'k')
See http://www.mathworks.com/help/techdoc/ref/figure_props.html#Renderer subsection "OpenGL vs. Other MATLAB Renderers"
The above code works around the line-on-surface problem by moving the line to above the surface.