TclError matplotlib 1.5.0

Mit dem folgenden Code wird ein TclError generiert.

import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt

plt.plot([1,2,3,4], [1,4,9,16], 'ro')
plt.axis([0, 6, 0, 20])
plt.show()

Wenn ich mein Skript im Terminal ausführe, erhalte ich Folgendes:

/Users/<username>/anaconda/lib/python2.7/site-packages/matplotlib/__init__.py:1035: UserWarning: Duplicate key in file "/Users/<username>/.matplotlib/matplotlibrc", line #2
  (fname, cnt))
objc[44479]: Class TKApplication is implemented in both /Users/<username>/anaconda/lib/libtk8.5.dylib and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined.
objc[44479]: Class TKMenu is implemented in both /Users/<username>/anaconda/lib/libtk8.5.dylib and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined.
objc[44479]: Class TKContentView is implemented in both /Users/<username>/anaconda/lib/libtk8.5.dylib and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined.
objc[44479]: Class TKWindow is implemented in both /Users/<username>/anaconda/lib/libtk8.5.dylib and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined.
2016-02-01 20:45:40.991 python[44479:21064918] setCanCycle: is deprecated.  Please use setCollectionBehavior instead
2016-02-01 20:45:41.000 python[44479:21064918] setCanCycle: is deprecated.  Please use setCollectionBehavior instead
Exception in Tkinter callback
Traceback (most recent call last):
  File "/Users/<username>/anaconda/lib/python2.7/lib-tk/Tkinter.py", line 1536, in __call__
    return self.func(*args)
  File "/Users/<username>/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py", line 283, in resize
    self.show()
  File "/Users/<username>/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py", line 355, in draw
    tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
  File "/Users/<username>/anaconda/lib/python2.7/site-packages/matplotlib/backends/tkagg.py", line 30, in blit
    id(data), colormode, id(bbox_array))
TclError

Was verursacht diesen Fehler? Ich habe versucht, @ hinzuzufügbackend: TkAgg zu meinemmatplotlibrc Datei, ohne Erfolg.

Bitte berate

Antworten auf die Frage(4)

Ihre Antwort auf die Frage