Mercurial > hg > octave-nkf
changeset 9272:3eda945bda43
__go_draw_axes__.m: Fix rendering of overlaping images and line objects. Add demos as well.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Tue, 26 May 2009 21:16:54 -0400 |
parents | 1e96773920e9 |
children | 61abb94f46f4 |
files | scripts/ChangeLog scripts/plot/__go_draw_axes__.m scripts/plot/hold.m |
diffstat | 3 files changed, 42 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2009-05-26 Ben Abbott <bpabbott@mac.com> + + * plot/__go_draw_axes__.m: Fix rendering of overlaping images and + line objects. Add demos as well. + 2009-05-27 Søren Hauberg <hauberg@gmail.com> * geometry/delaunay.m: Support cellstr's as options.
--- a/scripts/plot/__go_draw_axes__.m +++ b/scripts/plot/__go_draw_axes__.m @@ -1277,8 +1277,14 @@ fprintf (plot_stream, ", \"-\" %s %s %s \\\n", usingclause{i}, titlespec{i}, withclause{i}); elseif (is_image_data (i)) + if (! is_image_data (i-1)) + fputs (plot_stream, "; "); + endif fprintf (plot_stream, "%s \"-\" %s %s %s \\\n", plot_cmd, usingclause{i}, titlespec{i}, withclause{i}); + elseif (is_image_data (i-1)) + fprintf (plot_stream, "%s \"-\" binary format='%%float64' %s %s %s \\\n", plot_cmd, + usingclause{i}, titlespec{i}, withclause{i}); else fprintf (plot_stream, ", \"-\" binary format='%%float64' %s %s %s \\\n", usingclause{i}, titlespec{i}, withclause{i}); @@ -2092,4 +2098,3 @@ typ = -1; endif endfunction -
--- a/scripts/plot/hold.m +++ b/scripts/plot/hold.m @@ -86,3 +86,34 @@ set (h, "nextplot", hold_state); endfunction + +%!demo +%! clf +%! A = rand (100); +%! [X, Y] = find (A > 0.9); +%! imshow (A) +%! hold on +%! plot (X, Y, 'o') +%! hold off + +%!demo +%! clf +%! hold on +%! imagesc(1./hilb(4)); +%! plot (1:4, "-s") +%! hold off + +%!demo +%! clf +%! hold on +%! imagesc(1./hilb(2)); +%! imagesc(1./hilb(4)); +%! hold off + +%!demo +%! clf +%! hold on +%! plot (1:4, "-s") +%! imagesc(1./hilb(4)); +%! hold off +