title: How to display print statements interlaced with matplotlib plots inline in Ipython?
body: <p>I would like to have the output of print statements interlaced with plots, in the order in which they were printed and plotted in the Ipython notebook cell. For example, consider the following code:</p>
  
  <p>(launching ipython with <code>ipython notebook --no-browser --no-mathjax</code>)</p>
  
  <pre><code>%matplotlib inline
  import matplotlib.pyplot as plt
  
  i = 0
  for data in manydata:
      fig, ax = plt.subplots()
      print "data number i =", i
      ax.hist(data)
      i = i + 1
  </code></pre>
  
  <p>Ideally the output would look like:</p>
  
  <pre><code>data number i = 0
  (histogram plot)
  data number i = 1
  (histogram plot)
  ...
  </code></pre>
  
  <p>However, the actual output in Ipython will look like:</p>
  
  <pre><code>data number i = 0
  data number i = 1
  ...
  (histogram plot)
  (histogram plot)
  ...
  </code></pre>
  
  <p>Is there a direct solution in Ipython, or a workaround or alternate solution to get the interlaced output?</p>