bugGNU Octave - Bugs: bug #45594, gnuplot only supports 3-D...

 
 

bug #45594: gnuplot only supports 3-D triangular patches

Submitted by:  Avinoam Kalma <avinoam>
Submitted on:  Tue 21 Jul 2015 08:06:16 AM UTC  
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  Avinoam Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Sun 28 Feb 2016 04:00:32 PM UTC, comment #6:

I added bug #42575 to the dependency list as it would also be solved if gnuplot could create 2-D patches, or if Octave would create 3-D patchs with an empty Z-level.

Rik <rik5>
Project Administrator
Sat 19 Dec 2015 02:11:09 AM UTC, comment #5:

Below is a link describing how 3D polygons may be drawn with gnuplot

http://riotorto.users.sourceforge.net/gnuplot/3dmodel/

Ben Abbott <bpabbott>
Project Member
Thu 17 Dec 2015 11:25:40 PM UTC, comment #4:

@Dan,

Are general 3D polygons now supported by Gnuplot? I recall trying to fix this some years back and was unable. Can you provide more detail on what gnuplot version is needed and what the syntax is? If you have a gnuplot test script, that would be ideal.

It shouldn't be too much work to create a changeset including patches for _gnuplot_has_feature_ and _go_draw_axes_.

Ben

Ben Abbott <bpabbott>
Project Member
Mon 27 Jul 2015 07:03:58 PM UTC, comment #3:

Some combination of what you describe (I prefer to stay as 2D when possible but realize Octave has a "2D means 3D, but with particular viewing angle" philosophy) and the fact that gnuplot has a polygon object to fall back on should solve this with a fairly small changeset.

I've tested polygon objects in gnuplot. 3D coordinates are allowed.

Dan Sebald <sebald>
Sat 25 Jul 2015 02:39:46 PM UTC, 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.

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

The dimension check is done in C++ code in calc_dimensions is graphics.cc

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)

Rik <rik5>
Project Administrator
Tue 21 Jul 2015 08:08:31 AM UTC, comment #1:

Actually, the word color should be removed from the title

Avinoam Kalma <avinoam>
Project Member
Tue 21 Jul 2015 08:06:16 AM UTC, original submission:

See http://savannah.gnu.org/bugs/?45593,
original Submission, cooment #1 and
comment#2

Avinoam Kalma <avinoam>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #34518:  script_patch_problem.m added by rik5 (908B - text/x-objcsrc)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by sebald (Posted a comment)
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by avinoam (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-29 rik5 StatusNone => Confirmed
    2016-02-28 rik5 Dependencies- => bugs #42575 is dependent
    2015-07-25 rik5 Attached File- => Added script_patch_problem.m, #34518
        SummaryColor problem with patch () using gnuplot as graphics_toolkit => gnuplot only supports 3-D triangular patches

    Back to the top


    Powered by Savane 3.3