Hiding a subplot

Hi,

I have a canvas with two subplot… I want to be able to hide on of the subplots by pushing a button and letting the remaining subplot fill the entire canvas.

If I use the set_visible(True) parameter I correctly remove one of the subplots… but the remaining subplot does not fill the canvas… Anyone have an idea of how to do this?

Thanks,
Soren

You should be able to use the "change_geometry" method on the remaining subplot

  ax2.set_visible(False)
  ax1.change_geometry(1,1,1)
  fig.canvas.draw()

JDH

···

On Thu, Nov 20, 2008 at 8:06 AM, Søren Nielsen <soren.skou.nielsen@...287...> wrote:

Hi,

I have a canvas with two subplot.. I want to be able to hide on of the
subplots by pushing a button and letting the remaining subplot fill the
entire canvas.

If I use the set_visible(True) parameter I correctly remove one of the
subplots.. but the remaining subplot does not fill the canvas.. Anyone have
an idea of how to do this?