matplotlib quiver wrong plot [incl. proposed solution]
Bug #134919 reported by
Stijn de Waele
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
matplotlib (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Calling quiver with 2 arguments with non-square matrices as arguments give erroneous output.
An example is the following code:
+++++++++++++++
from pylab import *
import numpy as N
a=N.zeros((10,15))
a[0,:2]=1
a[1,:2]=5
quiver(a,a)
+++++++++++++++
It seems this can be traced back to the wrong order of nr and rc in /usr/share/
line 312 is now:
X, Y = [nx.ravel(a) for a in meshgrid(
This work as expected with:
X, Y = [nx.ravel(a) for a in meshgrid(
Related branches
To post a comment you must log in.
!!!The order of current line 312 and improvement is wrong...
Last lines of the bug report should read: nx.arange( nc), nx.arange(nr))] nx.arange( nr), nx.arange(nc))]
line 312 is now:
X, Y = [nx.ravel(a) for a in meshgrid(
This work as expected with:
X, Y = [nx.ravel(a) for a in meshgrid(