Naming the Axes of my Graph on iPython Using Matplotlib.pyplot
When you use matplotlib's plot function, it holds an object behind the scenes for you. You can change this object with more calls to plt and then only once everything has been done should you plt.show() the graph.

Here is a simply example that does what you want:

In [1]: import matplotlib.pyplot as plt
In [2]: import numpy as np                                                           

In [3]: x = np.linspace(0, 10, 100)                                                  
In [4]: y = x ** 2                                   


The following lines change the plot object, adding the axes labels - but we don't show it until all are complete...

In [5]: plt.plot(x, y)                                                               
Out[5]: [&lt;matplotlib.lines.Line2D at 0x7f3c896bb9b0&gt;]

In [6]: plt.xlabel("Time")                                                           
Out[6]: Text(0.5, 0, 'Time')

In [7]: plt.ylabel("Speed")  
Out[7]: Text(0, 0.5, 'Speed')


Now we are done, so show it:

In [8]: plt.show()                                                                  




Have a look here for a more thorough demo, which also shows the object explicitly and lets you better understand what is going on.