|
From: Giovanni P. <g.p...@gm...> - 2012-09-23 19:45:35
|
One of the suggestions I got works: >Maybe this: >self.ax.get_figure().clf() >self.ax.get_figure().add_axes(self.ax) >But it looks really weird to me. If I understand it correctly, from matplotlib version 1.1.1 (?) statements as "self.ax.get_figure().axes = []" are not possible any more as axes are not lists anymore. Don't take my word for it, though. Thanks for the support. 2012/9/23 Giovanni Plantageneto <g.p...@gm...>: > Hi everybody, > sorry, I guess the question is trivial, but I confess my matplotlib > and python ignorance. > > I'm running some code written by someone else, and apparently some > bits of the code are not compliant with newer versions of matplotlib. > So, how can I rewrite the following, which give AttributError? > >> self.ax.get_figure().axes = [] > > and > >> self.ax.get_figure().axes = [self.ax] > > Thanks a lot. |