I am trying to plot a complicated figure using calls to different functions. Im am working inside ipython notebook.

For the sake of the example, say that first I want to create a figure with a call to a function that does a scatter plot.

```
 import numpy as np
 import matplotlib.pyplot as plt

 def background():
     fig = plt.figure()
     ax = fig.add_subplot(1,1,1)
     ax.scatter(np.random.rand(10), np.random.rand(10))

     return fig, ax

 fig, ax = background()

```

Then, I want to overlay the next layer on top of my scatter plot. My understanding is that I should reuse the axes that I just got back from `background()`. What I'm currently trying to do is

```
 # Eventually, I would put the next lines inside a function
 ax.plot(np.random.rand(10), np.random.rand(10), '-')

 # next I want to show the updated figure
 fig.canvas.draw_idle() # doesn't work
 plt.show()             # doesn't work

```

What is the correct way of showing the updated plot?

I'm working with ipython notebook version 3.2.1, matplotlib version 2.02 and just in case anyone waoders, I did call `%matplotlib inline` before starting.