class interface: set_xlim, set_ylim

Hello everyone on the list,

I try to use the matplotlib class interface for my plotting application. I have a question which I hope you can help me with. The attached file contains a test case for my problem. From the example 'embedding_in_gtk2.py' I figured the proper way to use the class interface was to

1. create a Figure() instance
2. create a FigureCanvas instance, using the Figure as argument
3. create a subplot by using FigureCanvas.subplot

This works fine; however now I was trying to set the limits of the plot using the Axes.set_xlim and Axes.set_ylim functions. As you can see from the test, it won't affect the plot! On the other hand, this method works fine if you use the pylab 'show' method as in 'poly_editor.py'. Is this a bug or should I use another function to set the limits?

BTW, the documentation recommends passing two arguments to set_xlim, set_ylim, while the examples pass a list/tuple. Are both ways correct?

Thanks,

Niklas Volbers.

test.py (328 Bytes)