bugGNU Octave - Bugs: bug #35126, pie3.m demo failure (gnuplot)


bug #35126: pie3.m demo failure (gnuplot)

Submitted by:  marco atzeri <matzeri>
Submitted on:  Tue 20 Dec 2011 01:49:09 PM UTC  
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Microsoft Windows

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)

Thu 22 Dec 2011 12:04:03 AM UTC, comment #8: 

I've pushed a change to prevent rundemos from stopping when a demo throws an error.


I'm closing this item. It there is reason to reopen it, please do.

Ben Abbott <bpabbott>
Project Member
Wed 21 Dec 2011 05:13:02 PM UTC, comment #7: 

The prior changeset used lasterr(), but should have used lasterror().  A new one is attached.

(file #24642)

Ben Abbott <bpabbott>
Project Member
Wed 21 Dec 2011 11:17:45 AM UTC, comment #6: 

also surfc.m example 2

suffers the same failure
error: _go_draw_axes_: gnuplot (as of v4.2) only supports 3D filled triangular patches

marco atzeri <matzeri>
Tue 20 Dec 2011 06:35:04 PM UTC, comment #5: 


You reminded me that I had been wanting to add a try/catch block to the rundemos script. Something like the diff below.

diff --git a/scripts/testfun/rundemos.m b/scripts/testfun/rundemos.m
--- a/scripts/testfun/rundemos.m
+++ b/scripts/testfun/rundemos.m
@@ -62,7 +62,11 @@
     if (length (f) > 2 && strcmp (f((end-1):end), ".m"))
       f = fullfile (directory, f);
       if (has_demos (f))
-        demo (f);
+        try
+          demo (f);
+        catch
+          printf ("error: %s", lasterr().message)
+        end_try_catch
         if (i != numel (flist))
           input ("Press <enter> to continue: ", "s");

Ben Abbott <bpabbott>
Project Member
Tue 20 Dec 2011 06:25:26 PM UTC, comment #4: 

What about adding a %!demoif keyword that is equivalent to %!testif and only runs a demo if the named feature is available?

One could then write

%!demoif HAVE_FLTK
%! graphics_toolkit fltk;
%! ...

for tests which should only happen when the FLTK toolkit is available.

Rik <rik5>
Project Administrator
Tue 20 Dec 2011 06:09:34 PM UTC, comment #3: 

we can use FLTK as workaround, but does not make sense to have a
demo that does not work and stop the execution of rundemos
in one of the two graphics toolkit that currently is
also the default.
IMHO it should be better to disable this demo for the time being,
as rundemos should arrive at the end to be beneficial for users.

marco atzeri <matzeri>
Tue 20 Dec 2011 05:56:34 PM UTC, comment #2: 

I know this may seem obvious, but you could use the FLTK toolkit as a workaround.  I've changed the category of the bug to reflect that this is only a problem with the gnuplot backend.

Rik <rik5>
Project Administrator
Tue 20 Dec 2011 05:09:30 PM UTC, comment #1: 

David Batemann looked into having gnuplot render 3D patches a while back. Searching the archives might turn something up.

I recently took a look. It may be possible to triangulate a patch object and then render. If the polygons are all simple and convex, then the problem is straight forward. I can write a simple script for this case to demonstrate, but don't have the time right now.

It may also be possible to handle simple non-convex polygons in the m-files, used by the gnuplot backend, by constraining the triangles to lie within the original polygon, but I'm skeptical that it will be robust without adding some other meshing libs.

Ultimately, we need to be able to parse a complex polygon into a set of simple polygons, and those into triangles.

Sorry for not adding more detail. If there are questions, I can try to fill in the blanks.

Ben Abbott <bpabbott>
Project Member
Tue 20 Dec 2011 01:49:09 PM UTC, original submission:  

on latest tip on cygwin

$ hg tip
changeset:   14074:f90c3facfac3
branch:      stable
tag:         tip
user:        John W. Eaton <jwe@octave.org>
date:        Mon Dec 19 23:14:41 2011 -0500
summary:     don't reset parser when exiting (bug #35120)

$ gnuplot --version
gnuplot 4.4 patchlevel 4

rundemos stop here:

/usr/local/share/octave/3.5.90+/m/plot/pie3.m example 1:
 pie3 ([5:-1:1], [0, 0, 1, 0, 0]);
 colormap ([1,0,0;0,1,0;0,0,1;1,1,0;1,0,1;0,1,1]);

error: _go_draw_axes_: gnuplot (as of v4.2) only supports 3D filled triangular patches
error: called from:
error:   /usr/local/share/octave/3.5.90+/m/plot/private/__go_draw_axes__.m at line 647, column 20
error:   /usr/local/share/octave/3.5.90+/m/plot/private/__go_draw_figure__.m at line 167, column 19
error:   /usr/local/share/octave/3.5.90+/m/plot/__gnuplot_drawnow__.m at line 86, column 5
error: input: reading user-input failed!
error:   /usr/local/share/octave/3.5.90+/m/testfun/demo.m at line 119, column 7

marco atzeri <matzeri>


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

Attach Files:

Attached Files
file #24642:  changeset.patch added by bpabbott (857B - application/octet-stream - 2nd changeset)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by matzeri (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-12-22 bpabbott StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    2011-12-21 bpabbott Attached File- => Added changeset.patch, #24642
    2011-12-20 rik5 CategoryPlotting => Plotting with gnuplot
        StatusNone => Confirmed
        Summarypie3.m demo failure => pie3.m demo failure (gnuplot)

    Back to the top

    Powered by Savane 3.5