Mercurial > hg > octave-nkf
changeset 9297:0d9f925b9705
colorbar.m: Colorbar 'handlevisibility' should be 'on'. Add additional demos which illustrate problems with the present implementation.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Wed, 03 Jun 2009 10:54:36 -0400 |
parents | b41a7b2bd6fc |
children | 20ee7f9cc904 |
files | scripts/ChangeLog scripts/plot/colorbar.m |
diffstat | 2 files changed, 51 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,8 @@ 2009-06-03 Ben Abbott <bpabbott@mac.com> + * 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
--- a/scripts/plot/colorbar.m +++ b/scripts/plot/colorbar.m @@ -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