Bug in quiver

Steven Verstoep isgoed at hotmail.com
Fri Jan 16 11:20:54 CST 2009


Hi all,

A Bug in octave just wasted a day of my work:

[x, y] = meshgrid (1:12,1:9);
% passes:
quiver (x, y, sin (2*pi*x/10), sin (2*pi*y/10));
% fails:
quiver (sin (2*pi*x/10), sin (2*pi*y/10));

I found a way to solve this. First I completely wrote my own quiver 
plot, finding  it yielded the same results. I've found that it is 
because of the inconsequent way (Matlab legacy?) columns and rows are 
accessed:

[y x] = size(M) # <- Annoying X,Y makes sense!
columns = x;
rows = y;

In the file __quiver__.m line 43 change

[x, y, z] = meshgrid (1:size(u,1), 1:size(u,2), 1:max(size(w)));
     else
[x, y] = meshgrid (1:size(u,1), 1:size(u,2));

to

[x, y, z] = meshgrid (1:size(u,2), 1:size(u,1), 1:max(size(w)));
     else
[x, y] = meshgrid (1:size(u,2), 1:size(u,1));

restart octave

Already for 2 weeks I am trying to make a scientific plot. Opensource 
really should get their act together if they want to be a serious 
alternative for commercial software. This is the 2nd time I have to 
subscribe to this mailing list. I am reporting this just for your 
information, since I already solved my problem.

regards,

Stever
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2143 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/bug-octave/attachments/20090116/e54392ab/attachment.bin 


More information about the Bug-octave mailing list