[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: basic implementation for isosurface, isocolors, isonormals
From: |
David Bateman |
Subject: |
Re: basic implementation for isosurface, isocolors, isonormals |
Date: |
Tue, 14 Apr 2009 21:35:52 +0200 |
User-agent: |
Mozilla-Thunderbird 2.0.0.17 (X11/20081018) |
Martin Helm wrote:
First of all,
thank you for your effort David. I can confirm the errors reported by Thomas.
To be precise they happen with the first two examples in the "subplot" example
group which use the syntax
patch ("Faces", f, "Vertices", v, "EdgeColor", whatever)
The other two examples which use "FaceVertexCData" and facecoloring work well.
If I simply add the "FaceColor" attribute with some value to the failing patch
command, the problem disappears, so the bug seems to be trivial (a misssing
default value for "FaceColor")
e.g.
patch ("Faces", f, "Vertices", v, "FaceColor", "blue","EdgeColor", "none")
works well. I'll look through the code.
- mh
The old 3.0.x behavior was that the default facecolor was [0,1,0]. I
presume that is the compatible behavior and so re-established that as
the default with the attached patch. The demo in the help string then
works correctly for the gnuplot CVS. But there appear to be some issue
with colormap with gnuplot 4.2.4 and the x11 terminal in a multiplot
environment.. I suppose I should try 4.2.5 and see if that works
D.
--
David Bateman address@hidden
35 rue Gambetta +33 1 46 04 02 18 (Home)
92100 Boulogne-Billancourt FRANCE +33 6 72 01 06 33 (Mob)
# HG changeset patch
# User David Bateman <address@hidden>
# Date 1239736944 -7200
# Node ID 308311b642b2be2c4e171e15b9e8f35ea4615975
# Parent efac34f78ea49fe3bc624dfc1dd04e5262e95408
Explicitly set the default facecolor of patches
diff --git a/scripts/ChangeLog b/scripts/ChangeLog
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-11 David Bateman <address@hidden>
+
+ * plot/__patch__.m: Set default facecolor to [0,1,0].
+
2009-04-12 Aravindh Krishnamoorthy <address@hidden>
* special-matrix/hadamard.m: Fix a documentation mistake.
diff --git a/scripts/plot/__patch__.m b/scripts/plot/__patch__.m
--- a/scripts/plot/__patch__.m
+++ b/scripts/plot/__patch__.m
@@ -177,18 +177,23 @@
else
vert = args {idx};
endif
- idx = find (cellfun (@(x) strcmpi (x, "facecolor"), args)) + 1;
- if (isempty(idx) || idx > nargs)
- fc = "flat";
- else
- fc = args {idx};
- endif
idx = find (cellfun (@(x) strcmpi (x, "facevertexcdata"), args)) + 1;
if (isempty(idx) || idx > nargs)
fvc = [];
else
fvc = args {idx};
endif
+ idx = find (cellfun (@(x) strcmpi (x, "facecolor"), args)) + 1;
+ if (isempty(idx) || idx > nargs)
+ if (!isempty (fvc))
+ fc = "flat";
+ else
+ fc = [0, 1, 0];
+ endif
+ args = {"facecolor", fc, args{:}};
+ else
+ fc = args {idx};
+ endif
nr = size (faces, 2);
nc = size (faces, 1);
@@ -247,18 +252,23 @@
else
z = args {idx};
endif
- idx = find (cellfun (@(x) strcmpi (x, "facecolor"), args)) + 1;
- if (isempty(idx) || idx > nargs)
- fc = "flat";
- else
- fc = args {idx};
- endif
idx = find (cellfun (@(x) strcmpi (x, "cdata"), args)) + 1;
if (isempty(idx) || idx > nargs)
c = [];
else
c = args {idx};
endif
+ idx = find (cellfun (@(x) strcmpi (x, "facecolor"), args)) + 1;
+ if (isempty(idx) || idx > nargs)
+ if (!isempty (c))
+ fc = "flat";
+ else
+ fc = [0, 1, 0];
+ endif
+ args = {"facecolor", fc, args{:}};
+ else
+ fc = args {idx};
+ endif
[nr, nc] = size (x);
if (!isempty (z))
- Re: basic implementation for isosurface, isocolors, isonormals, David Bateman, 2009/04/03
- Re: basic implementation for isosurface, isocolors, isonormals, Thomas Treichl, 2009/04/08
- Re: basic implementation for isosurface, isocolors, isonormals, David Bateman, 2009/04/08
- Re: basic implementation for isosurface, isocolors, isonormals, Thomas Treichl, 2009/04/08
- Re: basic implementation for isosurface, isocolors, isonormals, David Bateman, 2009/04/11
- Re: basic implementation for isosurface, isocolors, isonormals, Daniel J Sebald, 2009/04/11
- Re: basic implementation for isosurface, isocolors, isonormals, Thomas Treichl, 2009/04/11
- Re: basic implementation for isosurface, isocolors, isonormals, David Bateman, 2009/04/12
- Re: basic implementation for isosurface, isocolors, isonormals, Martin Helm, 2009/04/12
- Re: basic implementation for isosurface, isocolors, isonormals,
David Bateman <=
- Re: basic implementation for isosurface, isocolors, isonormals, Thomas Treichl, 2009/04/14
- Re: basic implementation for isosurface, isocolors, isonormals, Martin Helm, 2009/04/14
- Re: basic implementation for isosurface, isocolors, isonormals, David Bateman, 2009/04/14
- Re: basic implementation for isosurface, isocolors, isonormals, Martin Helm, 2009/04/14
- Re: basic implementation for isosurface, isocolors, isonormals, Thomas Treichl, 2009/04/15