[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45594] gnuplot only supports 3-D triangular p
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #45594] gnuplot only supports 3-D triangular patches |
Date: |
Sat, 25 Jul 2015 14:39:46 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0 |
Update of bug #45594 (project octave):
Summary: Color problem with patch () using gnuplot as
graphics_toolkit => gnuplot only supports 3-D triangular patches
_______________________________________________________
Follow-up Comment #2:
I've attached the script which causes the error to this bug report. The
Octave file that issues the error is __go_draw_axes__.m.
669 if (nd == 3)
670 if (numel (xcol) > 3)
671--> error ("__go_draw_axes__: gnuplot (as of v4.2) only
supports 3-D filled triangular patches");
672 else
If this is just an unsupported feature of gnuplot, then this is not an Octave
bug. But it is possible that Octave is not converting things correctly.
In this case, the patch object 'zdata' property is all zeros. This is correct
because they are in fact 2-D patches drawn at Z=0. However, because the zdata
is not empty, the number of dimensions is calculated as 3. A simple
workaround for this particular example is
hp = get (gca, "children")
set (hp, "zdata", [])
The dimension check is done in C++ code in calc_dimensions is graphics.cc
int nd = 2;
if (go.isa ("surface"))
nd = 3;
else if ((go.isa ("line") || go.isa ("patch"))
&& ! go.get ("zdata").is_empty ())
nd = 3;
else
Now maybe the code should check whether all the zdata is 0 before deciding
that an object is 3-dimensional, although that is a much more expensive test
than just is_empty.
It can also be solved by going back to the original script_patch_problem.m and
not specifying zdata of all zeros in the patch. Then the patch is, correctly,
2-D.
(file #34518)
_______________________________________________________
Additional Item Attachment:
File name: script_patch_problem.m Size:0 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45594>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/