我在 Windows 上有 Networkx 1.6 和 Matplotlib 1.1.0 这是我的代码:
self.figure = Figure()
self.axes = self.figure.add_subplot(1,1,1)
self.canvas = FigureCanvas(self, -1, self.figure)
G = nx.Graph()
G.add_node(6)
pos = nx.spring_layout(G)
nx.draw(G, pos, ax = self.axes)
我得到了错误:
File "C:\Python27\lib\site-packages\matplotlib\axes.py, line 1374, in _sci
"Argument must be an image, collection, or ContourSet in this Axes"
ValueError: Argument must be an image, collection, or ContourSet in this Axes
有谁知道如何修理它?