Mercurial > hg > octave-nkf
diff scripts/plot/__go_draw_axes__.m @ 13165:9efb676b34ac stable
Fix bug #34015. Allow for sequential images.
* scripts/plot/__go_draw_axes__.m: Fix for sequential images.
* scripts/plot/image.m: Add demos.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Mon, 19 Sep 2011 20:18:47 -0400 |
parents | 62e710cea7f1 |
children |
line wrap: on
line diff
--- a/scripts/plot/__go_draw_axes__.m +++ b/scripts/plot/__go_draw_axes__.m @@ -1521,6 +1521,13 @@ fprintf (plot_stream, "%s \"-\" %s %s %s \\\n", plot_cmd, usingclause{1}, titlespec{1}, withclause{1}); elseif (is_image_data (1)) + if (numel (is_image_data) > 1 && is_image_data(2)) + ## Remove terminating semicolon + n = max (strfind (withclause{1}, ";")); + if (! isempty(n)) + withclause{1} = withclause{1}(1:n-1); + endif + endif fprintf (plot_stream, "%s \"-\" %s %s %s \\\n", plot_cmd, usingclause{1}, titlespec{1}, withclause{1}); else @@ -1542,9 +1549,20 @@ fputs (plot_stream, "unset obj 2; \\\n"); fg_is_set = false; endif + if (numel (is_image_data) > i && is_image_data(i+1)) + ## Remove terminating semicolon + n = max (strfind (withclause{i}, ";")); + if (! isempty(n)) + withclause{i} = withclause{i}(1:n-1); + endif + endif + fprintf (plot_stream, "%s \"-\" %s %s %s \\\n", plot_cmd, + usingclause{i}, titlespec{i}, withclause{i}); + else + ## For consecutive images continue with the same plot command + fprintf (plot_stream, "%s \"-\" %s %s %s \\\n", ",", + usingclause{i}, titlespec{i}, withclause{i}); endif - fprintf (plot_stream, "%s \"-\" %s %s %s \\\n", plot_cmd, - usingclause{i}, titlespec{i}, withclause{i}); elseif (is_image_data (i-1)) if (bg_is_set) fputs (plot_stream, "unset obj 1; \\\n");