¡@

Home 

python Programming Glossary: np.cos

Moving matplotlib legend outside of the axis makes it cutoff by the figure box

http://stackoverflow.com/questions/10101700/moving-matplotlib-legend-outside-of-the-axis-makes-it-cutoff-by-the-figure-box

111 ax.plot x np.sin x label 'Sine' ax.plot x np.cos x label 'Cosine' ax.plot x np.arctan x label 'Inverse tan' lgd.. 111 ax.plot x np.sin x label 'Sine' ax.plot x np.cos x label 'Cosine' ax.plot x np.arctan x label 'Inverse tan' handles..

How to add a second x-axis in matplotlib

http://stackoverflow.com/questions/10514315/how-to-add-a-second-x-axis-in-matplotlib

fig.add_subplot 111 ax2 ax1.twiny X np.linspace 0 1 1000 Y np.cos X 20 ax1.plot X Y ax1.set_xlabel r Original x axis X new_tick_locations..

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

b #draw 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.. 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 0..

How to draw diagrams like this?

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

Z3 Y3 angle 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.. '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 2 ax.plot_surface..

ode integration in python versus mathematica results

http://stackoverflow.com/questions/16222302/ode-integration-in-python-versus-mathematica-results

2 C c brentq f 5 0 print Jacobi's constant is c x0 re 200 np.cos nu pi2 r12 # x location of the satellite y0 re 200 np.sin nu.. 180 # flight path angle pick yourself vx vbo np.sin gamma np.cos nu np.cos gamma np.sin nu # velocity of the bo in the x direction.. path angle pick yourself vx vbo np.sin gamma np.cos nu np.cos gamma np.sin nu # velocity of the bo in the x direction vy..

Running matplotlib in tkinter

http://stackoverflow.com/questions/3845407/running-matplotlib-in-tkinter

0 2 np.pi 100 v np.linspace 0 np.pi 100 x 10 np.outer np.cos u np.sin v y 10 np.outer np.sin u np.sin v z 10 np.outer np.ones.. np.outer np.sin u np.sin v z 10 np.outer np.ones np.size u np.cos v ax.plot_surface x y z rstride 4 cstride 4 color 'lightgreen'..

matplotlib: adding second axes() with transparent background?

http://stackoverflow.com/questions/7761778/matplotlib-adding-second-axes-with-transparent-background

range 10 'r ' x np.linspace 0 6 np.pi newax.plot x 0.001 np.cos x 'g ' plt.show Note that the y axis values for anything plotted.. color 'red' x np.linspace 0 6 np.pi newax.plot x 0.001 np.cos x 'g ' newax.set_xlabel 'Green X axis' color 'green' newax.set_ylabel..

Smoothing Data in Contour Plot with Matlibplot

http://stackoverflow.com/questions/8055489/smoothing-data-in-contour-plot-with-matlibplot

import scipy.ndimage as ndimage X Y np.mgrid 70 70 70 70 Z np.cos X 2 Y 2 200. np.random.normal size X.shape # Increase the value..