0

I was practicing plotting in matplotlib, and I noticed that the following code works correctly when I run it as one big chunk, but not when I enter it line by line into the console (a blank figure window shows up, but the line does not). What gives?

import matplotlib.pylab as plt
fig,axes=plt.subplots()
axes.plot([1,2,3],[2,3,4])
plt.show()

I'm running Enthought Canopy, Python 2.7.6., matplotlib 1.3.1

Thanks!

P.S. What I find even stranger is if I subsequently type fig into the console, all of a sudden the correct plot pops up in the figure window.

monkeybiz7
  • 4,898
  • 5
  • 21
  • 35

0 Answers0