John, When running coutour_demo.py with the Cairo backend I get: File "matplotlib/figure.py", line 338, in draw for a in self.axes: a.draw(renderer) File "matplotlib/axes.py", line 1307, in draw self.legend_.draw(renderer) File "matplotlib/legend.py", line 181, in draw h.draw(renderer) File "matplotlib/lines.py", line 266, in draw gc.set_foreground(self._color) # problem File "/matplotlib/backends/backend_cairo.py", line 421, in set_foreground self.ctx.set_rgb_color(*self._rgb) TypeError: Context.set_rgb_color() takes exactly 3 arguments (4 given) It looks to like the frontend (lines.py) is working with rgba colors and passing the rgba color to the backend which is expecting rgb color. colors.colorConverter.to_rgb(fg) is also a problem because for rgba input it returns rgba not rgb. One solution would be to change the last lines of colorConverter.to_rgb(fg) from self.cache[arg] = color return color to color = color[0:3] self.cache[arg] = color return color To ensure that to_rgb() actually gives rgb and not rgba. What do you think? Steve