¡@

Home 

python Programming Glossary: ax1

How to add a second x-axis in matplotlib

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

numpy as np import matplotlib.pyplot as plt fig plt.figure ax1 fig.add_subplot 111 ax2 ax1.twiny X np.linspace 0 1 1000 Y np.cos.. as plt fig plt.figure ax1 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.. 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..

Shade 'cells' in polar plot with matplotlib

http://stackoverflow.com/questions/10837296/shade-cells-in-polar-plot-with-matplotlib

10j z np.random.random theta.size .reshape theta.shape fig ax1 ax2 plt.subplots ncols 2 subplot_kw dict projection 'polar'.. plt.subplots ncols 2 subplot_kw dict projection 'polar' ax1.scatter theta.flatten r.flatten c z.flatten ax1.set_title 'Scattered.. 'polar' ax1.scatter theta.flatten r.flatten c z.flatten ax1.set_title 'Scattered Points' ax2.pcolormesh theta r z ax2.set_title..

matplotlib: how to prevent x-axis labels from overlapping each other

http://stackoverflow.com/questions/13515471/matplotlib-how-to-prevent-x-axis-labels-from-overlapping-each-other

dates mdates.num2date mdates.datestr2num data 'date' fig ax1 plt.subplots ax1.bar dates col1 fig.autofmt_xdate Getting a.. mdates.datestr2num data 'date' fig ax1 plt.subplots ax1.bar dates col1 fig.autofmt_xdate Getting a simple list of tuples..

2D and 3D Scatter Histograms from arrays in Python

http://stackoverflow.com/questions/14002480/2d-and-3d-scatter-histograms-from-arrays-in-python

as pyplot from mpl_toolkits.mplot3d import Axes3D ax1 np.histogram2d x_data y_data bins bins ax2 np.histogram2d x_data.. bins ax3 np.histogram2d z_data y_data bins bins xs ys zs ax1 1 ax1 2 ax3 1 dx dy dz xs 1 xs 0 ys 1 ys 0 zs 1 zs 0 def rdn.. ax3 np.histogram2d z_data y_data bins bins xs ys zs ax1 1 ax1 2 ax3 1 dx dy dz xs 1 xs 0 ys 1 ys 0 zs 1 zs 0 def rdn return..

Matplotlib: Same title for 8 plots plotted using loop

http://stackoverflow.com/questions/16360588/matplotlib-same-title-for-8-plots-plotted-using-loop

I_phase F sum m np.cos 2 np.pi l x D for m l in zip i n f ax1 ax2 plt.subplots 2 for row in phase ax1.plot x F 'g' ax1.set_title.. m l in zip i n f ax1 ax2 plt.subplots 2 for row in phase ax1.plot x F 'g' ax1.set_title row plt.show python matplotlib .. f ax1 ax2 plt.subplots 2 for row in phase ax1.plot x F 'g' ax1.set_title row plt.show python matplotlib share improve this..

matplotlib: combine different figures and put them in a single subplot sharing a common legend

http://stackoverflow.com/questions/16748577/matplotlib-combine-different-figures-and-put-them-in-a-single-subplot-sharing-a

as plt # mode 01 from one case fig1 plt.figure ax1 fig1.add_subplot 111 ax1.plot x y1 label 'mode 01' # mode 01.. 01 from one case fig1 plt.figure ax1 fig1.add_subplot 111 ax1.plot x y1 label 'mode 01' # mode 01 from other case fig2 plt.figure.. works. Now it would be really convenient to pass the ax1 and ax2 objects to the new figure since they have much more..

fitting data with numpy

http://stackoverflow.com/questions/18767523/fitting-data-with-numpy

and fitting curve with the command fig1 plt.figure ax1 fig1.add_subplot 111 ax1.scatter x y facecolors 'None'.. fig1 plt.figure ax1 fig1.add_subplot 111 ax1.scatter x y facecolors 'None' ax1.plot x_new ffit x_new.. 111 ax1.scatter x y facecolors 'None' ax1.plot x_new ffit x_new plt.show I get the following fitting_data.png..

plotting results of hierarchical clustering ontop of a matrix of data in python

http://stackoverflow.com/questions/2982929/plotting-results-of-hierarchical-clustering-ontop-of-a-matrix-of-data-in-python

and plot first dendrogram. fig pylab.figure figsize 8 8 ax1 fig.add_axes 0.09 0.1 0.2 0.6 Y sch.linkage D method 'centroid'.. method 'centroid' Z1 sch.dendrogram Y orientation 'right' ax1.set_xticks ax1.set_yticks # Compute and plot second dendrogram... Z1 sch.dendrogram Y orientation 'right' ax1.set_xticks ax1.set_yticks # Compute and plot second dendrogram. ax2 fig.add_axes..

fitting exponential decay with no initial guessing

http://stackoverflow.com/questions/3938042/fitting-exponential-decay-with-no-initial-guessing

noisy_y y 0.5 np.random.random num 0.5 fig plt.figure ax1 fig.add_subplot 2 1 1 ax2 fig.add_subplot 2 1 2 # Non linear.. fit_exp_nonlinear t noisy_y fit_y model_func t A K C plot ax1 t y noisy_y fit_y A0 K0 C0 A K C0 ax1.set_title 'Non linear.. t A K C plot ax1 t y noisy_y fit_y A0 K0 C0 A K C0 ax1.set_title 'Non linear Fit' # Linear Fit Note that we have to..

How can I improve my paw detection?

http://stackoverflow.com/questions/4087919/how-can-i-improve-my-paw-detection

2 .start # Plot up a simple analysis fig plt.figure ax1 fig.add_subplot 2 1 1 annotate_paw_prints time data data_slices.. 2 1 1 annotate_paw_prints time data data_slices ax ax1 ax2 fig.add_subplot 2 1 2 plot_paw_impacts time data_slices..

Possible to make labels appear when hovering over a point in matplotlib?

http://stackoverflow.com/questions/7908636/possible-to-make-labels-appear-when-hovering-over-a-point-in-matplotlib

scatter ' ind npy.take x ind npy.take y ind fig figure ax1 fig.add_subplot 111 col ax1.scatter x y 100 s c picker True.. ind npy.take y ind fig figure ax1 fig.add_subplot 111 col ax1.scatter x y 100 s c picker True #fig.savefig 'pscoll.eps' fig.canvas.mpl_connect..

why is plotting with Matplotlib so slow?

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

library from pylab import import time ion fig figure ax1 fig.add_subplot 611 ax2 fig.add_subplot 612 ax3 fig.add_subplot.. ax6 fig.add_subplot 616 x arange 0 2 pi 0.01 y sin x line1 ax1.plot x y 'r ' line2 ax2.plot x y 'g ' line3 ax3.plot x y 'y..