Thu 23 Jul 2015 07:55:52 PM UTC, comment #8:
I changed Octave to pass all fields in the face/vertex structure through to the underlying patch command. See http://hg.savannah.gnu.org/hgweb/octave/rev/85dcbed19753. The change was made on the stable branch and will be part of the 4.0.1 bug fix release.
|
Thu 23 Jul 2015 11:19:23 AM UTC, comment #7:
> I notice that you are trying to set the facecolor property
> inside the structure. That syntax isn't accepted according
> to the Matlab documentation, but it might be undocumented
> behavior.
Hello Rik,
You right, this is undocumented behaviour. And the other syntaxes that you propose are ok.
However, since this undocumented behaviour was also supported by Octave 3.8.x, perhaps would it be better to keep supporting it if we can ? i.e., accept any valid property of a patch object as field in the structure ?
Concerning your Matlab question, I get the following with R2012b:
The rectangles are black in the first two cases, and green in the thrid case.
|
Wed 22 Jul 2015 08:54:13 PM UTC, comment #6:
@Julien: This doesn't seem as bad as I first thought. The problem is that the 'facecolor' attribute is being set to [0 0 0] (black). If you change the 'facecolor' attribute to 'flat' the correct coloring is restored.
There are still a number of questions however. The test script uses the structure syntax for supplying the faces and vertices.
I notice that you are trying to set the facecolor property inside the structure. That syntax isn't accepted according to the Matlab documentation, but it might be undocumented behavior.
Here are a couple examples of syntax that works in Octave:
Do you have access to Matlab? I'd like to try and see what is going on here.
|
Tue 21 Jul 2015 08:17:03 AM UTC, comment #5:
Thank you.
|
Tue 21 Jul 2015 08:07:08 AM UTC, comment #4:
A new report was filed for the gnuplot issue.
|
Tue 21 Jul 2015 06:51:49 AM UTC, comment #3:
@Avinoam Kalm, Dan Sebald: this gnuplot error seems to be unrelated with the original purpose of this bug report.
Indeed, this error message disappears if you simply remove the unused third column in the coord matrix (see attached script).
And then gnuplot behaves exactly like Qt and FLTK: the rectangles have the correct size but not are all black.
Please keep this bug report focused on the patch/color issue, and open another bug report to discuss the issue about gnuplot and 3-D patches.
(file #34477)
|
Tue 21 Jul 2015 06:34:40 AM UTC, comment #2:
The following code is what complains and the pm3d style of gnuplot is used:
If one were to write the above to use triangulation of polygons, it would be possible to use pm3d. However, a more straightforward approach might be to use gnuplot's polygon object. As an example:
|
Tue 21 Jul 2015 05:25:12 AM UTC, comment #1:
Using gnuplot as graphics_toolkit, I get
|
Tue 21 Jul 2015 05:11:49 AM UTC, original submission:
The attached script demonstrates a regression between Octave 3.8.2 and Octave 4.0.0 with the patch function.
The corrected behaviour (also observed in Matlab R2012b) is to produce a patch of color-filled rectangles. See patches_octave382_fltk.eps.
In Octave 4.0.0, both with Qt and FTLK as graphic toolkits, the rectangles are black. See patches_octave400_fltk.eps and patches_octave400_qt.eps.
|