¡@

Home 

python Programming Glossary: np.sin

Python/matplotlib : plotting a 3d cube, a sphere and a vector?

http://stackoverflow.com/questions/11140163/python-matplotlib-plotting-a-3d-cube-a-sphere-and-a-vector

sphere u v np.mgrid 0 2 np.pi 20j 0 np.pi 10j x np.cos u np.sin v y np.sin u np.sin v z np.cos v ax.plot_wireframe x y z color.. v np.mgrid 0 2 np.pi 20j 0 np.pi 10j x np.cos u np.sin v y np.sin u np.sin v z np.cos v ax.plot_wireframe x y z color r #draw.. 0 2 np.pi 20j 0 np.pi 10j x np.cos u np.sin v y np.sin u np.sin v z np.cos v ax.plot_wireframe x y z color r #draw a point ax.scatter..

How to draw diagrams like this?

http://stackoverflow.com/questions/14824893/how-to-draw-diagrams-like-this

r 7 M 1000 th np.linspace 0 2 np.pi M x y z r np.cos th r np.sin th angle r np.sin th ax.plot_surface X2 Y3 Z3 color 'blue' alpha.. 0 2 np.pi M x y z r np.cos th r np.sin th angle r np.sin th ax.plot_surface X2 Y3 Z3 color 'blue' alpha .75 linewidth.. X Y Z color 'red' alpha .75 linewidth 0 zorder 1 ax.plot r np.sin th r np.cos th np.zeros M lw 5 linestyle ' ' color 'k' zorder..

Numpy meshgrid in 3D

http://stackoverflow.com/questions/1827489/numpy-meshgrid-in-3d

5 5 0.1 y np.arange 5 5 0.1 xx yy np.meshgrid x y z np.sin xx 2 yy 2 xx 2 yy 2 x asarray x y asarray y numRows numCols..

Inverse Distance Weighted (IDW) Interpolation with Python

http://stackoverflow.com/questions/3104781/inverse-distance-weighted-idw-interpolation-with-python

Nnear leafsize eps p def terrain x ~ rolling hills return np.sin 2 np.pi cycle np.mean x axis 1 known np.random.uniform size..

Set Colorbar Range in matplotlib

http://stackoverflow.com/questions/3373256/set-colorbar-range-in-matplotlib

0 10 .1 y np.arange 0 10 .1 X Y np.meshgrid x y data 2 np.sin X np.sin 3 Y def do_plot n f title #plt.clf plt.subplot 1 3.. .1 y np.arange 0 10 .1 X Y np.meshgrid x y data 2 np.sin X np.sin 3 Y def do_plot n f title #plt.clf plt.subplot 1 3 n plt.pcolor..

matplotlib Update a Plot

http://stackoverflow.com/questions/4098131/matplotlib-update-a-plot

as plt import numpy as np x np.linspace 0 6 np.pi 100 y np.sin x # You probably won't need this if you're embedding things..

Python/Matplotlib - Is there a way to make a discontinuous axis?

http://stackoverflow.com/questions/5656798/python-matplotlib-is-there-a-way-to-make-a-discontinuous-axis

9 to 10 with the same spacing. x np.r_ 0 1 0.1 9 10 0.1 y np.sin x fig ax ax2 plt.subplots 1 2 sharey True # plot the same data.. 9 to 10 with the same spacing. x np.r_ 0 1 0.1 9 10 0.1 y np.sin x fig ax ax2 plt.subplots 1 2 sharey True # plot the same data..

why is plotting with Matplotlib so slow?

http://stackoverflow.com/questions/8955869/why-is-plotting-with-matplotlib-so-slow

numpy as np import time x np.arange 0 2 np.pi 0.01 y np.sin x fig axes plt.subplots nrows 6 styles 'r ' 'g ' 'y ' 'm ' 'k.. 1 20 for j line in enumerate lines start 1 line.set_ydata np.sin j x i 10.0 fig.canvas.draw print 'FPS ' 20 time.time tstart.. import numpy as np import time x np.arange 0 2 np.pi 0.1 y np.sin x fig axes plt.subplots nrows 6 styles 'r ' 'g ' 'y ' 'm ' 'k..