Installation
sudo apt-get install python-scipy
sudo apt-get install Python-numpy
sudo apt-get install Python-matplotlib
Test
#Test Plot fromMpl_toolkits.mplot3dImportAxes3dImportMatplotlib.pyplot as Plt fromMatplotlibImportCmfig=plt.figure () Ax= FIG.GCA (projection='3d') X, Y, Z= Axes3d.get_test_data (0.05) Ax.plot_surface (X, Y, Z, Rstride=8, Cstride=8, alpha=0.3) Cset= Ax.contour (X, Y, Z, zdir='Z', offset=-100, cmap=cm.coolwarm) Cset= Ax.contour (X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm) Cset= Ax.contour (X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm) Ax.set_xlabel ('X') Ax.set_xlim (-40, 40) Ax.set_ylabel ('Y') Ax.set_ylim (-40, 40) Ax.set_zlabel ('Z') Ax.set_zlim (-100, 100) plt.show ()#Test NumPy fromNumPyImport*PrintRandom.rand (bis)#Test scipyImportNumPy as NP fromScipy.statsImportBeta fromMatplotlib.pyplotImporthist, Plot, Showobs= Beta.rvs (5, 5, size=2000)#Observationshist (Obs, bins=40, normed=True) Grid= Np.linspace (0.01, 0.99, 100) plot (grid, Beta.pdf (grid,5, 5),'k -', linewidth=2) Show ()
[[0.65980666 0.55674039 0.15432447 0.63885279]
[0.77583865 0.78290332 0.31575893 0.12678885]
[0.67791378 0.86333224 0.97039675 0.95323786]
[0.31306339 0.54107452 0.79611926 0.05306962]]
Ubuntu Python installation numpy SciPy, matplotlib Environment