[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #34282] Holes in filled countours don't get th
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #34282] Holes in filled countours don't get the background colour |
Date: |
Tue, 13 Sep 2011 11:27:05 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110804 Red Hat/3.6.20-2.el6_1 Firefox/3.6.20 |
URL:
<http://savannah.gnu.org/bugs/?34282>
Summary: Holes in filled countours don't get the background
colour
Project: GNU Octave
Submitted by: None
Submitted on: Tue 13 Sep 2011 11:27:04 AM UTC
Category: Plotting
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Anders Höglund
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 3.4.2
Operating System: GNU/Linux
_______________________________________________________
Details:
The below code should produce a (green) filled disc with a hole in the centre.
On version 3.4.2 the whole in the centre is a third colour (dark red) instead
of the background colour (white).
x = linspace(-2,2);
[X,Y] = meshgrid(x);
contourf(x,x,sqrt(X.^2+Y.^2)./(X.^2+Y.^2+1) ,[0.4,0.4] )
The following patch to __contour__.m appears to fix the problem for me.
--- /usr/share/octave/3.4.2/m/plot/private/__contour__.m 2011-08-12
15:46:16.000000000 +0200
+++ __contour__.m 2011-09-13 12:09:37.372008000 +0200
@@ -319,10 +319,15 @@
else
## Special case unclosed contours
endif
+ if (isnan(cont_lev(idx)))
+ fc = [1, 1, 1];
+ else
+ fc = "flat";
+ endif
h = [h; __go_patch__(ca, "xdata", ctmp(1, :)(:), "ydata", ctmp(2,
:)(:),
"vertices", ctmp.', "faces", 1:(cont_len(idx)-1),
"facevertexcdata", cont_lev(idx),
- "facecolor", "flat", "cdata", cont_lev(idx),
+ "facecolor", fc, "cdata", cont_lev(idx),
"edgecolor", lc, "linestyle", ls,
"linewidth", lw, "parent", hg)];
endfor
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?34282>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #34282] Holes in filled countours don't get the background colour,
anonymous <=