Funny thing, messing around with your example I find that graph_draw seems to be drawing onto the wrong axis: when you pass axis 3 it draws inside aixs 1, passing axis 4 draws inside axis 2, and what you pass as axes 1 and 2 is likely being drawn outside the canvas. Also, if you exapnd to 8 axes, it plots only 4 of them, so it seems things are being shifted halfway updards before drawing. I looked at the code but having never played with Cairo it is not evident what could be wrong, but hopefully this will help.
.~´