viewport off-by-one error?

Now on to your problem.

In backend_gtk draw_rectangle, change

        x, y = int(x), self.height-int(math.ceil(y+height))

to
        x, y = int(x), self.height-int(y+height)

and the GraphicsContext.set_clip_rectangle method to

    def set_clip_rectangle(self, rectangle):
        GraphicsContextBase.set_clip_rectangle(self, rectangle)
        l,b,w,h = rectangle
        rectangle = (int(l), self.renderer.height-int(b+h)+1,
                     int(w), int(h))
        self.gdkGC.set_clip_rectangle(rectangle)

I tried this but it made things worse. With simple_plot.py the plot now
extends above the top axis line.

Steve