bugGNU Octave - Bugs: bug #36193, scatter(X,Y,..,C) fails

 
 

bug #36193: scatter(X,Y,..,C) fails

Submitter:  S T Sarkar <bobatnet>
Submitted:  Sun 15 Apr 2012 02:10:43 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 19 Jun 2012 11:03:09 PM UTC, comment #10: 

Ok. I've pushed the changest in John's name.

http://hg.savannah.gnu.org/hgweb/octave/rev/566cf544d020

Ben Abbott <bpabbott>
Group Member
Tue 19 Jun 2012 01:26:56 PM UTC, comment #9: 

Oh, my apologies Ben. I thought you would push it, since I thought you were the one who knew this part of the code best. Weren't you the one who implemented the prior scatter fix?

Ah, oops, I assigned this to myself. I just undid that.

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Tue 19 Jun 2012 12:03:43 PM UTC, comment #8: 

Jordi/John

Has the patch been pushed ?

Ben Abbott <bpabbott>
Group Member
Wed 09 May 2012 06:40:44 AM UTC, comment #7: 

"columns (c)" is fine, but the mail should end with ".us" :
John Hunt <huntj@gmx.us>


John Hunt <huntj>
Wed 09 May 2012 03:50:17 AM UTC, comment #6: 

Hey, John Hunt.

Thanks for the patch. Is it ok if I credit your patch as "John Hunt <huntj@gmx.de>"?

Also, as a matter of style, we prefer to use "columns (c)" instead of "size (c, 2)". I hope you're ok with that instead. If so, I'll push this patch, credited to you.

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Sun 06 May 2012 06:59:20 AM UTC, comment #5: 

i get the same error as described earlier (error: invalid value for color property "markerfacecolor" ...), both under Ubuntu 12.04 with octave 3.2.4, and under Gentoo with octave 3.6.0, and i can confirm that the patch (file #25652) solves the issue.

hoijui

Anonymous
Wed 25 Apr 2012 07:22:55 PM UTC, comment #4: 

in answer to comment #2 :
size(pm6)
ans =

   153     5

it is available in the "data" file #25650 attached.
"load data" worked fine here (octave 3.6.1, linux)

John Hunt <huntj>
Wed 25 Apr 2012 06:12:00 PM UTC, comment #3: 

The patch solves the problem to do the following plot with gnuplot the same way as with fltk

[x,y,z] = meshgrid(-10:1:10,-5:1:5,-8:2:8);
% this creates x,y and z 3-D arrays, x contains -10:1:10 replicated
length(-5:1:5)xlength(-8:2:8) times, y contains -5:1;5 replicated .....
c = x.^2+y.^2+z.^2;
% c is now our function of 3 variables
figure
scatter3(x(:),y(:),z(:),5,c(:),'filled')

before applying it it gave the same error as in the first post.

- Martin Helm

Anonymous
Wed 25 Apr 2012 05:50:01 PM UTC, comment #2: 

What is pm6? Specifically, what size is it?

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Sun 15 Apr 2012 05:00:01 PM UTC, comment #1: 

Same bug under linux

This seems related to the "gnuplot_hack" line 271 of _scatter_.m
It does not work when c is a vector.
changing this line to

gnuplot_hack = false;

removes the error in this case.

But then the the following fails (it should plot black points)

scatter(pm6(:,1),pm6(:,2),20,zeros(size(pm6, 1), 3),'filled')
error: vertical dimensions mismatch (153x3 vs 1x1)



finally changing this line 271 of _scatter_.m to

gnuplot_hack = numel (x) > 1 && size(c, 2) == 3 && strcmp (toolkit, "gnuplot");


seems to work in both cases.
Patch attached.

(file #25652)

John Hunt <huntj>
Sun 15 Apr 2012 02:10:43 PM UTC, original submission:  

The following plot, involving a scatter plot, fails with the error:


scatter(pm6(:,1),pm6(:,2),20,pm6(:,3),'filled')


error: invalid value for color property "markerfacecolor"
error: called from:
error:   D:\Octave\Octave-3.6.1\share\octave\3.6.1\m\plot\private\__scatter__.m at line 274, column 11
error:   D:\Octave\Octave-3.6.1\share\octave\3.6.1\m\plot\private\__scatter__.m at line 211, column 13
error:   D:\Octave\Octave-3.6.1\share\octave\3.6.1\m\plot\scatter.m at line 71, column 11

The same command, though when run from MATLAB works without any error.

S T Sarkar <bobatnet>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #25652:  __scatter__.m.patch added by huntj (643B - text/x-patch)
file #25650:  data added by bobatnet (5KiB - application/octet-stream - file "data" contains the matrix pm6)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by huntj (Updated the item)
  • -email is unavailable- added by bobatnet (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 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-10-02 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2012-06-19 bpabbott StatusPatch Submitted Ready For Test
        Release3.6.1 dev
        Operating SystemMicrosoft Windows Any
    2012-06-19 jordigh Assigned tojordigh None
    2012-05-09 jordigh Assigned toNone jordigh
    2012-05-09 jordigh StatusNone Patch Submitted
    2012-04-15 huntj Attached File- Added _scatter_.m.patch, #25652
    2012-04-15 bobatnet Attached File- Added data, #25650

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code