diff scripts/plot/colorbar.m @ 7726:1b954fdaf4ff

Try to get the colorbar position right for manual aspect ratios as well
author David Bateman <dbateman@free.fr>
date Mon, 21 Apr 2008 11:03:39 -0400
parents fac10884ddd4
children 86955a1559c5
line wrap: on
line diff
--- a/scripts/plot/colorbar.m
+++ b/scripts/plot/colorbar.m
@@ -148,3 +148,92 @@
 %! imagesc(x)
 %! colorbar("southoutside");
 
+%!demo
+%! hold off;
+%! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); 
+%! subplot(1,2,1)
+%! imagesc(x)
+%! axis square;
+%! colorbar();
+%! subplot(1,2,2)
+%! imagesc(x)
+%! axis square;
+%! colorbar("westoutside");
+
+%!demo
+%! hold off;
+%! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); 
+%! subplot(1,2,1)
+%! imagesc(x)
+%! axis square;
+%! colorbar("northoutside");
+%! subplot(1,2,2)
+%! imagesc(x)
+%! axis square;
+%! colorbar("southoutside");
+
+%!demo
+%! hold off;
+%! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); 
+%! subplot(2,1,1)
+%! imagesc(x)
+%! axis square;
+%! colorbar();
+%! subplot(2,1,2)
+%! imagesc(x)
+%! axis square;
+%! colorbar("westoutside");
+
+%!demo
+%! hold off;
+%! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); 
+%! subplot(2,1,1)
+%! imagesc(x)
+%! axis square;
+%! colorbar("northoutside");
+%! subplot(2,1,2)
+%! imagesc(x)
+%! axis square;
+%! colorbar("southoutside");
+
+%!demo
+%! hold off;
+%! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); 
+%! subplot(1,2,1)
+%! imagesc(x)
+%! colorbar();
+%! subplot(1,2,2)
+%! imagesc(x)
+%! colorbar("westoutside");
+
+%!demo
+%! hold off;
+%! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); 
+%! subplot(1,2,1)
+%! imagesc(x)
+%! colorbar("northoutside");
+%! subplot(1,2,2)
+%! imagesc(x)
+%! colorbar("southoutside");
+
+%!demo
+%! hold off;
+%! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); 
+%! subplot(2,1,1)
+%! imagesc(x)
+%! colorbar();
+%! subplot(2,1,2)
+%! imagesc(x)
+%! colorbar("westoutside");
+
+%!demo
+%! hold off;
+%! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); 
+%! subplot(2,1,1)
+%! imagesc(x)
+%! colorbar("northoutside");
+%! subplot(2,1,2)
+%! imagesc(x)
+%! colorbar("southoutside");
+
+