[changeset] clarification to pcolor doc-string
Francesco Potorti`
Potorti at isti.cnr.it
Tue Sep 23 14:49:12 CDT 2008
>Does gnuplot directly support an interpolated image viewing mode?
Apparently yes. The pm3d manual page of gnuplot mentions
interpolation.
As a stopgap, I tried to modify __go_draw_axes__.m to issue warnings
when "interp" is requested, but "flat" is used instead. This is already
done in some places where "interp" is used, but not in all places.
In fact, of the following hunks, only the third one is needed to issue a
warning when using pcolor, I don't know when the first two ones are
triggered. And none of them is triggered when using imagesc, don't know
why.
Here is the behaviour I observe with the patch:
octave> close all
octave> imagesc(magic(5))
octave> shading('interp')
octave> pcolor(magic(5))
octave> shading('interp')
warning: "interp" not supported, using "flat"
Last of all, sorry, but I did not manage to create a changeset, because
in the fifteen minutes I dedicated to it I could not understand how it
works.
diff -r de8b07e95d1b scripts/ChangeLog
--- a/scripts/ChangeLog Mon Sep 22 13:38:15 2008 -0400
+++ b/scripts/ChangeLog Tue Sep 23 21:45:26 2008 +0200
@@ -1,3 +1,8 @@
+2008-09-23 Francesco Potortì <pot at gnu.org>
+
+ * plot/__go_draw_axes__.m: Issue a warning when using "flat" in
+ place of "interp" with the gnuplot backend.
+
2008-09-22 Ben Abbott <bpabbott at mac.com>
* plot/comet.m: New file.
diff -r de8b07e95d1b scripts/plot/__go_draw_axes__.m
--- a/scripts/plot/__go_draw_axes__.m Mon Sep 22 13:38:15 2008 -0400
+++ b/scripts/plot/__go_draw_axes__.m Tue Sep 23 21:39:48 2008 +0200
@@ -558,6 +558,9 @@ function __go_draw_axes__ (h, plot_strea
endif
usingclause{data_idx} = "";
if (isfield (obj, "facecolor"))
+ if (strncmp (obj.facecolor, "interp", 6))
+ warning ("\"interp\" not supported, using \"flat\"");
+ endif
if ((strncmp (obj.facecolor, "flat", 4)
|| strncmp (obj.facecolor, "interp", 6))
&& isfield (obj, "cdata"))
@@ -633,6 +636,9 @@ function __go_draw_axes__ (h, plot_strea
endif
if (isfield (obj, "edgecolor"))
+ if (strncmp (obj.edgecolor, "interp", 6))
+ warning ("\"interp\" not supported, using \"flat\"");
+ endif
if ((strncmp (obj.edgecolor, "flat", 4)
|| strncmp (obj.edgecolor, "interp", 6))
&& isfield (obj, "cdata"))
@@ -879,6 +885,10 @@ function __go_draw_axes__ (h, plot_strea
## Interpolation does not work for flat surfaces (e.g. pcolor)
## and color mapping --> currently set empty.
interp_str = "";
+ if (strncmp (obj.edgecolor, "interp", 6)
+ || strncmp (obj.facecolor, "interp", 6))
+ warning ("\"interp\" not supported, using \"flat\"");
+ endif
flat_interp_face = (strncmp (obj.facecolor, "flat", 4)
|| strncmp (obj.facecolor, "interp", 6));
flat_interp_edge = (strncmp (obj.edgecolor, "flat", 4)
More information about the Bug-octave
mailing list