bugGNU Octave - Bugs: bug #39552, quiver/quiver3 ignores scale with...

 
 

bug #39552: quiver/quiver3 ignores scale with only one point to plot

Submitted by:  None
Submitted on:  Mon 22 Jul 2013 07:34:49 PM UTC  
 
Category:  Plotting Severity:  2 - Minor
Priority:  3 - Low Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Alex Burka Originator Email:  -email is unavailable-
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.

 

Wed 16 Nov 2016 10:00:13 PM UTC, comment #1: 

Confirmed here, still present with the development version of Octave (4.3.0+) on Debian.

Here is a simple example showing that the arrow scaling factor does not work, and in fact the scale of a single arrow is blown out of proportion compared to how it is computed with a full field of arrows.

Derived from the demo of quiver:

[x,y] = meshgrid (1:2:20);
u = sin (2*pi*x/10); v = sin (2*pi*y/10);
quiver (x, y, u, v, 1); axis ([0, 20, 0, 20]);
quiver (x, y, u, v, .5); axis ([0, 20, 0, 20]);
## At this point, the scale factor works

subs = 3:7;
quiver (x(subs,subs), y(subs,subs), u(subs,subs), v(subs,subs), 1); axis ([0, 20, 0, 20]);
quiver (x(subs,subs), y(subs,subs), u(subs,subs), v(subs,subs), .5); axis ([0, 20, 0, 20]);
## Scaling still works for a subset of the original 100 arrows

subs = 4;
quiver (x(subs,subs), y(subs,subs), u(subs,subs), v(subs,subs), 1); axis ([0, 20, 0, 20]);
quiver (x(subs,subs), y(subs,subs), u(subs,subs), v(subs,subs), .5); axis ([0, 20, 0, 20]);
## Scaling now has no effect


Mike Miller <mtmiller>
Project Administrator
Mon 22 Jul 2013 07:34:49 PM UTC, original submission:  

The functions quiver and quiver3 take an optional scaling value "to use for the arrows of the field relative to the mesh spacing." However, if only one point is passed to quiver (or quiver3), this scaling factor is ignored. The bug is in /usr/local/share/octave/3.6.4/m/plot/private/__quiver__.m on line 108, where changing > to >= fixes the problem.

I am testing on OS X (octave installed with brew) and gnuplot plotting, but I think those are irrelevant for this bug.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #28644:  __quiver__.m added by None (13KiB - 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 mtmiller (Posted a comment)
  • -email is unavailable- added by None (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
    2016-11-16 mtmiller Severity3 - Normal => 2 - Minor
        Priority5 - Normal => 3 - Low
        StatusNone => Confirmed
        Release3.6.4 => dev
        Operating SystemMac OS => Any
    2013-07-22 None Attached File- => Added __quiver__.m, #28644

    Back to the top


    Powered by Savane 3.5