GTK backend problem

Hi, all. I have a problem when using matpltlib and pygtk. When I draw a very very long line in a figure, the line cannot be drawn as it should be. For example, consider the codes below:

---------------------Beginning of codes----------------------

#!/usr/bin/env python
import gtk

from matplotlib.figure import Figure
from matplotlib.lines import Line2D

from matplotlib.backends.backend_gtkagg import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtkagg
import NavigationToolbar2GTK as NavigationToolbar

Uncomment the two lines below to use GTKAgg as a different backend

#from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas
#from matplotlib.backends.backend_gtkagg
import NavigationToolbar2GTKAgg \

as NavigationToolbar

win = gtk.Window()
win.connect(“destroy”, lambda x: gtk.main_quit())
win.set_title(“Embedding in GTK”)
vbox = gtk.VBox()

fig = Figure()
ax = fig.add_subplot(111)
ax.set_xlim(0, 2)
(-2, 2)
ax.plot([1, 1, 20000,20000], [-1, 1, 1, 0])

canvas = FigureCanvas(fig)
toolbar = NavigationToolbar(canvas, win)
vbox.pack_start(toolbar, False, False)

---------------------End of codes----------------------
You might think that it will show a line like this:

                            >                                              A very very long line ....

But the result is like this:
Also a very very long line … |

You can view the picture here:

And if you use the zoom button in the navigation toolbar to zoom out this image, the horizontal line will change its direction to right. You can view the picture here:

But if you use GTKAgg as matplotlib’s backend the figure shows properly. Here is the source code file, you can try it yourself.

I have tried to read the source codes of the library to know the reason, but I have not enough knowledge of image processing and I failed.

Any help is appreciated. Thank you.