I\'ve been following \'python for data analysis\'. On pg. 345, you get to this code to plot returns across a variety of stocks. However, the plotting function does not work for
The other answers didn't work for me. Instead my problem was because I was starting the notebook with ipython notebook --pylab. Once I dropped the --pylab things worked again.
So make sure you start ipython notebook with only ipython notebook.
(There's actually a warning emitted when you use --pylab but I missed it until now.)