How do i make full pcolor plot in axes and spesific plot of pcolor?

1 view (last 30 days)
Greetings I would like to make my plot "full screen" in axes, but i don't know how to do this is my code
[X,Y] = meshgrid(0:.1:2.5); Z = peaks(X,Y); pcolor(Z); shading(gca,'interp'); grid on; set(gca,'layer','top');
the result
and how to make my pcolor plot like this example
Thanks

Answers (1)

Image Analyst
Image Analyst on 12 May 2014
Try using image() instead of pcolor().
[X,Y] = meshgrid(0:.01:2.5);
Z = peaks(X,Y);
image(255*mat2gray(Z));
colormap(jet(256));
colorbar;
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
% Give a name to the title bar.
set(gcf, 'Name', 'Demo by ImageAnalyst', 'NumberTitle', 'Off')
  8 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!