bugGNU Octave - Bugs: bug #32821, __go_draw_axes__: operator *:...

 
 

bug #32821: __go_draw_axes__: operator *: nonconformant arguments

Submitter:  None
Submitted:  Thu 17 Mar 2011 03:41:55 PM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Alex Mamonov Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.4.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 12 Mar 2013 10:47:25 PM UTC, comment #9: 

This bug has been fixed sometime in the last 2 years.  Verified on Mercurial revision 16290:d07aeecb2d22.

Rik <rik5>
Group administrator
Sat 19 Mar 2011 08:45:01 PM UTC, comment #8: 

I've put together an example that indicates gnuplot can do the job, but that there is something wrong (in _go_draw_axes_, I assume).


x = rand (100, 1);
y = rand (100, 1);
z = x.^2 + y.^2;
tri = delaunay (x, y);
cmap = colormap (jet (64));
c1 = interp1 ([min(z), max(z)], [1, 64], z);
c2 = interp1 (cmap, c1, 'nearest');
graphics_toolkit gnuplot
close all
figure (1)
h = trisurf (tri, x, y, z, c2, "facecolor", "interp", "edgecolor", "k");
graphics_toolkit fltk
figure (2)
h = trisurf (tri, x, y, z, c2, "facecolor", "interp", "edgecolor", "k");


Gnuplot is able to produce the colored triangulated patches, but the coloring isn't correct.

Ben Abbott <bpabbott>
Group Member
Sat 19 Mar 2011 05:29:20 PM UTC, comment #7: 

I've been looking at how 3D triangular patches work and don't understand why the change to _go_draw_axes_ doesn't produce the correct result, so I haven't pushed it yet.

Ben Abbott <bpabbott>
Group Member
Sat 19 Mar 2011 05:25:34 PM UTC, comment #6: 

Did you also apply the patch for gnuplot?  I tried


graphics_toolkit gnuplot
demo trisurf


And I still get the originally reported error, not the green result.


error: _go_draw_axes_: operator *: nonconformant arguments (op1 is 0x0, op2 is 3x1)


Rik <rik5>
Group administrator
Sat 19 Mar 2011 03:17:02 PM UTC, comment #5: 

I've modified trisurf to produce an image compatible with matlab.

http://hg.savannah.gnu.org/hgweb/octave/rev/482cf3aad915

(1) Gnuplot still only produces a green result.
(2) the clim values are still not correct.

Ben Abbott <bpabbott>
Group Member
Fri 18 Mar 2011 08:43:42 PM UTC, comment #4: 

I've attached the plot I get from Matlab.

With the changeset included, the FLTK version has two problems.

(1) The color limits are not updated correctly.

(2) The edgecolor has not been set to black.

Regarding GNUPLOT, I recall there are some limits to what can be done for 3D patches.

I think it was David Batemann who worked on 3D triangulated patches (as is used by isosurface). The original threat on this is below. I've cc'd David. Perhaps he can tell us if the 3D triangulated patches can have different colors and colored edges.

http://octave.1599824.n4.nabble.com/basic-implementation-for-isosurface-isocolors-isonormals-tt1654636.html#none







Ben Abbott <bpabbott>
Group Member
Fri 18 Mar 2011 07:26:02 PM UTC, comment #3: 

Although the patch allows Octave to plot with trisurf, the actual plot produced is quite different (single green color) from the one produced with FLTK.  I'm attaching two scripts to generate the figures and two png images of the plots.

(file #22958, file #22960,

Rik <rik5>
Group administrator
Fri 18 Mar 2011 06:47:03 PM UTC, comment #2: 

I've attached a chageset.

I'm not sure this is a proper solution, but this fixes the error for me.

(file #22957)

Ben Abbott <bpabbott>
Group Member
Fri 18 Mar 2011 05:50:59 AM UTC, comment #1: 

Confirmed on a recent development tip as well (12516:3d6584617da0).

Rik <rik5>
Group administrator
Thu 17 Mar 2011 03:41:55 PM UTC, original submission:  

When calling trisurf with gnuplot toolkit with something like

> x = rand(100, 1); y = rand(100, 1); z = x.^2 + y.^2;
> tri = delaunay(x, y);
> graphics_toolkit('gnuplot');
> trisurf(tri, x, y, z);


it results in

error: _go_draw_axes_: operator *: nonconformant arguments (op1 is 0x0, op2 is 3x1)
error: called from:
error:   /workspace/LOCAL/OCTAVE/octave-3.4.0/scripts/plot/__go_draw_axes__.m at line 649, column 30
error:   /workspace/LOCAL/OCTAVE/octave-3.4.0/scripts/plot/__go_draw_figure__.m at line 167, column 19
error:   /workspace/LOCAL/OCTAVE/octave-3.4.0/scripts/plot/__gnuplot_drawnow__.m at line 86, column 5

This is new to 3.4.0, the 3.2.x series works as expected. Using trisurf with FLTK toolkit in 3.4.0 also works as expected.

If this bug is fixed could you please add a test or demo in trisurf.m performing the above sequence of commands for both backends.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #22963:  matlab.png added by bpabbott (44KiB - image/png)
file #22958:  trisurf_gnuplot.m added by rik5 (134B - application/octet-stream)
file #22959:  trisurf_gnuplot.png added by rik5 (12KiB - image/png)
file #22960:  trisurf_fltk.m added by rik5 (131B - application/octet-stream)
file #22961:  trisurf_fltk.png added by rik5 (22KiB - image/png)
file #22957:  changeset.patch added by bpabbott (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bpabbott (David, any thought on gnuplot's ability to individually color 3D triangulated patches?)
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by bpabbott (Updated the item)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-03-12 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2011-03-18 bpabbott Attached File- Added matlab.png, #22963
        Carbon-Copy- Added -email is unavailable-
    2011-03-18 rik5 Attached File- Added trisurf_gnuplot.m, #22958
        Attached File- Added trisurf_gnuplot.png, #22959
        Attached File- Added trisurf_fltk.m, #22960
        Attached File- Added trisurf_fltk.png, #22961
    2011-03-18 bpabbott StatusConfirmed Patch Submitted
    2011-03-18 bpabbott Attached File- Added changeset.patch, #22957
    2011-03-18 rik5 Carbon-CopyRemoved 72865 -
    2011-03-18 rik5 StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code