2

I am trying to learn matplotlib using Ipython but can't work out how interactive mode works.

There is a similar question here

Exact semantics of Matplotlib's "interactive mode" (ion(), ioff())?

but the referenced discussion link is broken.

I start Ipython using

ipython --pylab

then

figure()
title('Title')

works interactively, but

fig=figure()
fig.suptitle('Suptitle')

requires a

draw()

to update in the figure window.

Why are these responses different? If I have two figures how do I cause them both to update interactively? Do I have to call draw() every time?

Community
  • 1
  • 1
pheon
  • 2,867
  • 3
  • 26
  • 33
  • I found the link for the broken link on the other page. It is now http://matplotlib.1069221.n5.nabble.com/Exact-semantics-of-ion-td11481.html I can't fix it over there as I don't have sufficient reputation. – pheon Feb 25 '14 at 19:00

1 Answers1

0

interactive mode is not really useful when you are using ipython because it already knows when to display the plots.

It is more usefull when you are using a normal python shell and you will be able to control when the figures pop up.

with ion() the plots will pop up as soon as you make them.

with ioff() the plots will not pop up until you call plt.show().

unda91
  • 63
  • 1
  • 4