# HG changeset patch # User Ben Abbott # Date 1244040876 14400 # Node ID 0e60041ef2e523d7b5e87189dcd391fa31f8c670 # Parent 5ea44288952da1ea089a417880b2eb4c135ad887 colorbar.m: Colorbar 'handlevisibility' should be 'on'. Add additional demos which illustrate problems with the present implementation. diff -r 5ea44288952d -r 0e60041ef2e5 scripts/ChangeLog --- a/scripts/ChangeLog Wed Jun 03 10:40:20 2009 -0400 +++ b/scripts/ChangeLog Wed Jun 03 10:54:36 2009 -0400 @@ -1,5 +1,8 @@ 2009-06-03 Ben Abbott + * plot/colorbar.m: Colorbar 'handlevisibility' should be 'on'. + Add additional demos which illustrate problems with the present + implementation. * plot/__gnuplot_has_feature__.m: Change version for "x11_figure_position" from ">=4.3.0" to ">=4.2.5". * plot/__scatter__.m: If the color spec is empty, set using diff -r 5ea44288952d -r 0e60041ef2e5 scripts/plot/colorbar.m --- a/scripts/plot/colorbar.m Wed Jun 03 10:40:20 2009 -0400 +++ b/scripts/plot/colorbar.m Wed Jun 03 10:54:36 2009 -0400 @@ -113,7 +113,7 @@ set (ax, "activepositionproperty", "position", "position", pos); cax = __go_axes__ (get (ax, "parent"), "tag", "colorbar", - "handlevisibility", "off", + "handlevisibility", "on", "activepositionproperty", "position", "position", cpos); addproperty ("location", cax, "radio", @@ -550,3 +550,50 @@ %! ytick = get(h, "ytick"); %! set (h, "yticklabel", sprintf ('10^{%g}|', ytick)); +%!demo +%! clf +%! n=5;x=linspace(0,5,n);y=linspace(0,1,n); +%! imagesc(1./hilb(n)); axis equal; colorbar + +%!demo +%! clf +%! n=5;x=linspace(0,5,n);y=linspace(0,1,n); +%! imagesc(x,y,1./hilb(n)); axis equal; colorbar + +%!demo +%! clf +%! n=5;x=linspace(0,5,n);y=linspace(0,1,n); +%! imagesc(y,x,1./hilb(n)); axis equal; colorbar +## This requires that the axes position be properly determined for "axes equal" + +%!demo +%! clf +%! axes +%! colorbar +%! hold on +%! contour(peaks) +%! hold off + +%!demo +%! clf +%! plot([0, 2]) +%! colorbar ("east") +%! axis square + +%!demo +%! clf +%! plot([0, 2]) +%! colorbar ("eastoutside") +%! axis square + +%!demo +%! clf +%! plot([0, 2]) +%! colorbar ("east") +%! axis equal + +%!demo +%! clf +%! plot([0, 2]) +%! colorbar ("eastoutside") +%! axis equal