Matplotlib
From charlesreid1
#REDIRECT Matplotlib:Main_Page
Types of Plots
Histogram
from matplotlib import rcParams
from pylab import *
# construct the distribution with a given mean and deviation:
# -----------------------------------------------------------
# mu = mean
# sigma = standard deviation
# randn(10000) creates an array of size 10,000 x 1 that contains random numbers
mu, sigma = 0, 0.5
x = mu + sigma*randn(10000)
# plot the histogram of the data:
# --------------------------
figure(1)
# this will plot the data with the y-axis as the total number of samples (i.e. 350+)
#n, bins, patches = hist(x, 100,)
# this will plot the histogram with a normalized y-axis
n, bins, patches = hist(x, 100, normed=1)
| Scientific Computing Topics in scientific computing.
Numerical Software: Lapack · Sundials · Matlab · Octave · FFTW Petsc · Example Petsc Makefile · Trilinos · Hypre · Ginac · Gnuplot
Python: Numpy · Scipy · Pandas · Matplotlib · Python Sundials · Py4Sci Scikit-learn: Sklearn · Skimage
|