From: <phi...@ho...> - 2005-09-20 15:13:27
|
Hi list, Hi John, I'm using matplotlib in OO mode. I created an instance of Figure then add some subplots to it. from matplotlib.axes import Subplot from matplotlib.figure import Figure self.fig = Figure(figsize=(320,200), dpi=80) a = self.fig.add_subplot(1,1,1, axisbg='r') Now i create another instance of Figure. self.new_fig = Figure(figsize=(320,200), dpi=80) My aim is to add a Subplot instance to the new Figure instance and changind the number of rows and columns and the position of the Subplot. I could have done: self.new_fig.add_subplot(a) Nevertheless, it doesn't work. self.new_fig is empty when displaying it in a FigureCanvas. Furthermore, i need the property of subplot to change. a.set(2,2,1) self.new_fig.add_subplot(a) Is there any solution except to make another instance of the subplot? Thanks a lot, Philippe Collet |