For the life of me, I can not get matplotlib
to display graphs in ipython
inactively.
I've tried two approaches - each time, I get the same results:
In [10]: plot([1,2,3])
Out[10]: [<matplotlib.lines.Line2D at 0x104e9ca50>]
Here are the two approaches I have tried so far: Using the documentation as a guide, I tried two different approaches:
First:
ipython --pylab
plot([1,2,3])
xlabel('hi mom')
In [3]: plot([1,2,3])
Out[3]: [<matplotlib.lines.Line2D at 0x107e369d0>]
Second:
ipython
import numpy
import pylab
In [5]: pylab.plot([1,2,3])
Out[5]: [<matplotlib.lines.Line2D at 0x104ca7b90>]
How do I get the plot to display?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.