matplotlib examples

  • Clip 3D array points outside of axes Issue:While plotting a matplotlib 3D plot, if you set axis limits to be lesser than the the maximum range of the array.The array values are plotted outside the ...
    Posted Jul 24, 2012, 6:45 AM by Mart Objartel
  • Animated 3D plot import matplotlib.pyplot as plt import mpl_toolkits.mplot3d.axes3d as axes3d fig = plt.figure(figsize=(4,4)) ax1 = fig.add_subplot(1, 1, 1, projection='3d') #data x = [1 ...
    Posted Oct 21, 2011, 1:43 AM by Mart Objartel
  • stacked bar plot with legend (hatch pattern), exploded pie chart import matplotlib.pyplot as pltimport numpy as npfig = plt.figure(figsize=(7.4, 7.4))ax1 = fig.add_subplot(211)ax2 = fig.add_subplot(212)#datadata_1 ...
    Posted Oct 26, 2011, 10:00 AM by Mart Objartel
  • sin, sine, sinus import numpy as npimport matplotlib.pyplot as plt#http://matplotlib.sourceforge.net/examples/pylab_examples/spine_placement_demo.htmlfig = plt.figure(figsize=(4, 5))ax = fig.add_subplot ...
    Posted May 9, 2011, 1:39 AM by Mart Objartel
  • 3D surface, wireframe, regression import numpy as npimport matplotlib.pyplot as pltfrom matplotlib import cmimport mpl_toolkits.mplot3d.axes3d as axes3dfig = plt.figure()ax = fig.add_subplot(111, projection='3d ...
    Posted May 9, 2011, 12:32 AM by Mart Objartel
  • Simple 3d plot with 3d errorbars import numpy as npimport matplotlib.pyplot as pltimport mpl_toolkits.mplot3d.axes3d as axes3dfig = plt.figure(dpi=100)ax = fig.add_subplot(111, projection='3d')#datafx ...
    Posted Apr 25, 2011, 12:20 AM by Mart Objartel
  • multible Y axes, parasite axes from mpl_toolkits.axes_grid.parasite_axes import SubplotHostimport matplotlib.pyplot as pltimport numpy as np#datax = (1, 3, 4, 6, 8, 9, 12)y1 = (0, 1 ...
    Posted Apr 21, 2011, 5:39 AM by Mart Objartel
  • Scientific notation, text styles, LaTex import matplotlib.pyplot as pltimport numpy as npfig = plt.figure(figsize=(9, 1.5))ax = fig.add_subplot(111)x=np.arange(0, 10, 0.1)y=2 ...
    Posted Apr 21, 2011, 3:00 AM by Mart Objartel
  • 3d plot with 3d errorbars, projections, text labels Simple version import numpy as npimport matplotlib.pyplot as pltimport mpl_toolkits.mplot3d.axes3d as axes3dfig = plt.figure()ax = fig.add_subplot(111, projection='3d')#datafname ...
    Posted Apr 25, 2011, 12:18 AM by Mart Objartel
  • 3x6 2D plots, with normalized data and special characters(LaTeX) in labels import numpy as npimport matplotlib.pyplot as pltimport matplotlib.colors as co#dataout1 = [11,13,14,15,17,21,21,27]out2 = [1236,1673,2203,2803,3288 ...
    Posted Apr 21, 2011, 3:07 AM by Mart Objartel
  • plot with dynamic marker sizes import numpy as npimport matplotlib.pyplot as plt#datax = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]y = [3, 2, 5, 7, 4, 2, 4, 6 ...
    Posted Apr 21, 2011, 3:07 AM by Mart Objartel
  • Plot with x-errorbars and generated line from numpy import arange, logimport pylab as pltimport matplotlib as mplfig = plt.figure(figsize=(3.54, 3.2))host = fig.add_subplot(111)muy = [0.1,0 ...
    Posted Apr 21, 2011, 5:41 AM by Mart Objartel
Showing posts 1 - 12 of 12. View more ยป





Subpages (1): Posts
Comments