¡@

Home 

python Programming Glossary: plt.subplots

Fit a gaussian function

http://stackoverflow.com/questions/11507028/fit-a-gaussian-function

f delimiter ' ' dtype float skiprows 1 usecols None fig ax plt.subplots plt.hist v bins 500 color '#7F38EC' histtype 'step' plt.title..

How can I attach a pyplot function to a figure instance?

http://stackoverflow.com/questions/14254379/how-can-i-attach-a-pyplot-function-to-a-figure-instance

facecolor 'white' ax fig1.add_subplot 111 ax.contour X Y Z plt.subplots makes it convenient to create a figure and subplots with a single..

Heatmap in matplotlib with pcolor?

http://stackoverflow.com/questions/14391959/heatmap-in-matplotlib-with-pcolor

row_labels list 'WXYZ' data np.random.rand 4 4 fig ax plt.subplots heatmap ax.pcolor data cmap plt.cm.Blues # put the major ticks.. True nba_sort 'PTS' .head 10 # Plot it out fig ax plt.subplots heatmap ax.pcolor nba_sort cmap plt.cm.Blues alpha 0.8 # Format..

Moving x-axis to the top of a plot in matplotlib

http://stackoverflow.com/questions/14406214/moving-x-axis-to-the-top-of-a-plot-in-matplotlib

row_labels list 'WXYZ' data np.random.rand 4 4 fig ax plt.subplots heatmap ax.pcolor data cmap plt.cm.Blues # put the major ticks.. row_labels list 'WXYZ' data np.random.rand 4 4 fig ax plt.subplots heatmap ax.pcolor data cmap plt.cm.Blues # put the major ticks..

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

new figure and two subplots sharing both axes fig3 ax3 ax4 plt.subplots 1 2 sharey True sharex True figsize 10 5 # Plot data from fig1.. # Make space for the legend beneath the subplots plt.subplots_adjust bottom 0.2 # Show only fig3 fig3.show This gives output..

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

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 on both axes ax.plot x.. # Make the spacing between the two axes a bit smaller plt.subplots_adjust wspace 0.15 plt.show To add the broken axis lines effect.. 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 on both axes ax.plot x..

Matplotlib - label each bin

http://stackoverflow.com/questions/6352740/matplotlib-label-each-bin

import FormatStrFormatter data np.random.randn 82 fig ax plt.subplots counts bins patches ax.hist data facecolor 'yellow' edgecolor..

matplotlib: adding second axes() with transparent background?

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

somewhat verbose... import matplotlib.pyplot as plt fig ax plt.subplots newax ax.twiny # Make some room at the bottom fig.subplots_adjust.. import matplotlib.pyplot as plt import numpy as np fig ax plt.subplots fig.subplots_adjust bottom 0.2 newax fig.add_axes ax.get_position.. import matplotlib.pyplot as plt import numpy as np fig ax plt.subplots fig.subplots_adjust bottom 0.2 right 0.85 newax fig.add_axes..

Is there a function to make scatterplot matrices in matplotlib?

http://stackoverflow.com/questions/7941207/is-there-a-function-to-make-scatterplot-matrices-in-matplotlib

the subplot grid. numvars numdata data.shape fig axes plt.subplots nrows numvars ncols numvars figsize 8 8 fig.subplots_adjust..

why is plotting with Matplotlib so slow?

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

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 ' 'c ' lines ax.plot x.. 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 ' 'c ' def plot ax style.. numpy as np 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 ' 'c ' def plot ax style..

matplotlib: limits when using plot and imshow in same axes

http://stackoverflow.com/questions/9120749/matplotlib-limits-when-using-plot-and-imshow-in-same-axes

import matplotlib.pyplot as plt import numpy as np fig ax plt.subplots ax.imshow np.random.random 10 10 ax.plot range 11 plt.show With.. import matplotlib.pyplot as plt import numpy as np fig ax plt.subplots ax.imshow np.random.random 10 10 ax.autoscale False ax.plot..