Skip to content

Commit b0c9a60

Browse files
author
CindeeM
committed
BF: remove deprecated matplotlib.numerix imports, change to numpy import
1 parent 4788304 commit b0c9a60

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

brainx/nxplot.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -483,11 +483,9 @@ def draw_networkx_edges(G, pos,
483483
try:
484484
import matplotlib
485485
import matplotlib.pylab as pylab
486-
import matplotlib.numerix as nmex
487-
import matplotlib.cbook as cb
486+
import numpy as nmex
488487
from matplotlib.colors import colorConverter,Colormap
489488
from matplotlib.collections import LineCollection
490-
import matplotlib.numerix.mlab as mlab
491489
except ImportError:
492490
raise ImportError, "Matplotlib required for draw()"
493491
except RuntimeError:
@@ -603,10 +601,10 @@ def draw_networkx_edges(G, pos,
603601
)
604602

605603
# update view
606-
minx = mlab.amin(mlab.ravel(edge_pos[:,:,0]))
607-
maxx = mlab.amax(mlab.ravel(edge_pos[:,:,0]))
608-
miny = mlab.amin(mlab.ravel(edge_pos[:,:,1]))
609-
maxy = mlab.amax(mlab.ravel(edge_pos[:,:,1]))
604+
minx = nmex.amin(nmex.ravel(edge_pos[:,:,0]))
605+
maxx = nmex.amax(nmex.ravel(edge_pos[:,:,0]))
606+
miny = nmex.amin(nmex.ravel(edge_pos[:,:,1]))
607+
maxy = nmex.amax(nmex.ravel(edge_pos[:,:,1]))
610608

611609
w = maxx-minx
612610
h = maxy-miny

0 commit comments

Comments
 (0)