Installed is anaconda, which contains NumPy, scipy, matplotlib and other scientific computing packages
Https://www.continuum.io/downloads
Open python in Anaconda in terminal
/home/qi/anaconda/bin/python
>>> from matplotlib import pyplot as pl>>> import numpy as np>>> from scipy import interpolate& gt;>> x = Np.linspace ( -10, 5, +) >>> y = -2*x**3 + 5*x**2 + 9>>> pl.figure (figsize = (8, 4)) <matplotlib.figure.figure object at 0xb14f10ac>>>> pl.plot (x, y, color= "blue", LineWidth = 1.5) [< Matplotlib.lines.Line2D object at 0xb0c6348c>]>>> pl.show ()
Pl.figure Setting the plot area size
Pl.plot start drawing, and set line color, and line width
Pl.show Display Image
Display image
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/85/9D/wKioL1eqfB_xuUeAAABR1jG11MU044.png-wh_500x0-wm_3 -wmp_4-s_305764135.png "title=" Figure_1.png "alt=" Wkiol1eqfb_xuueaaabr1jg11mu044.png-wh_50 "/>
Reference:
http://zhan.renren.com/pythonlover?gid=3602888498028996903
This article is from the "R and Python apps" blog, so be sure to keep this source http://matrix6ro.blog.51cto.com/1746429/1836377
Python matplotlib draw three function images