python-matplotlib can't display figures with TclError

Bug #330971 reported by ahfuji
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
matplotlib (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: python-matplotlib

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu jaunty (development branch)
Release: 9.04
Codename: jaunty

$ LANG=C apt-cache policy python-matplotlib
python-matplotlib:
  Installed: 0.98.5.2-1
  Candidate: 0.98.5.2-1
  Version table:
 *** 0.98.5.2-1 0
        500 http://archive.ubuntu.com jaunty/universe Packages
        100 /var/lib/dpkg/status

There is a histogram demo available at a gallery site of matplotlib at

http://matplotlib.sourceforge.net/examples/api/histogram_demo.html.

I downloaded and ran this program, but it failed to draw the histogram
with some error messages as follows.

---
$ python histogram_demo.py
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1417, in __call__
    return self.func(*args)
  File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_tkagg.py", line 212, in resize
    self.show()
  File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_tkagg.py", line 216, in draw
    tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
  File "/usr/lib/python2.5/site-packages/matplotlib/backends/tkagg.py", line 19, in blit
    tk.call("PyAggImagePhoto", photoimage, id(aggimage), colormode, id(bbox_array))
TclError
---

When, in addition, I ran it, a window titled 'Figure 1' appeared. But, it displays nothing.

Revision history for this message
n4t (n4t) wrote :

It's possible to avoid that problem by downgrading python-tk to 2.5.2 version

Revision history for this message
dan od (dan-odonovan+ubuntu) wrote :

I'm pretty sure that this is a matplotlib bug rather than an Ubuntu one - I'll see if I can submit it to the SciPy people.

Revision history for this message
dan od (dan-odonovan+ubuntu) wrote :

* I'm pretty sure about this as * I have seen this in Windows and Mac OSX

Revision history for this message
Benjamin Drung (bdrung) wrote :

The bug is fixed in matplotlib 0.98.5.2-1ubuntu2 (combined with python-tk 2.6.1-0ubuntu2). The histogram demo is drawn without errors.

Changed in matplotlib:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.