From: Camille Couzi on
Hi
I am having a problem with your solutions, I think it is a problem with my computer system.
- I have first run your program with the two subplots (imagesc and pcolor), and that work fine,
- Then I have copied your last program (with the three subplots, imagesc, pcolor and alpha), and I get the figure with the labels and title reversed (as I had put a mirror above the title).
How can I fix that problem?

Thank you in advance for your help.

Camille.


Jerome Briot <dutmatlab(a)yahoo.fr> wrote in message <fhkdah$pf8$1(a)netfinity.fr>...
> Here is a third solution using transparency and axes color :
>
> M=rand(5,6);
> idx=randperm(numel(M));
> M(idx(1:5))=nan
>
> figure;
> colormap(gray);
>
> subplot(3,1,1)
> imagesc(M);
> axis image
>
> set(gca,'xtick',[.5:size(M,2)+.5], ...
> 'xticklabel','', ...
> 'ytick',[.5:size(M,1)+.5], ...
> 'yticklabel','', ...
> 'xgrid','on', ...
> 'ygrid','on', ...
> 'gridlinestyle','-');
> title('IMAGE')
>
> subplot(3,1,2)
> img=imagesc(M);
>
> set(img,'alphadata',~isnan(M));
> set(gca,'color','r');
> axis image
>
> set(gca,'xtick',[.5:size(M,2)+.5], ...
> 'xticklabel','', ...
> 'ytick',[.5:size(M,1)+.5], ...
> 'yticklabel','', ...
> 'xgrid','on', ...
> 'ygrid','on', ...
> 'gridlinestyle','-');
> title('IMAGE+ALPHA')
>
> subplot(3,1,3)
>
> M(size(M,1)+1,size(M,2)+1)=0;
> pcolor(M)
> axis equal tight
>
> set(gca,'xtick',[], ...
> 'xticklabel','', ...
> 'ytick',[], ...
> 'yticklabel','',...
> 'ydir','reverse',...
> 'color','r');
> title('PCOLOR')
>
> Jérôme