| |
- and_(...)
- and_(a, b) -- Same as a & b.
- axes(*args, **kwargs)
- Add an axis at positon rect specified by
axes() by itself creates a default full subplot(111) window axis
axes(rect, axisbg='w') where rect=[left, bottom, width, height] in
normalized (0,1) units background is the background color for
the axis, default white
axes(h) where h is an axes instance makes h the
current axis An Axes instance is returned
axisbg is a color format string which sets the background color of
the axes
If axisbg is a length 1 string, assume it's a color format string
(see plot for legal color strings). If it is a length 7 string,
assume it's a hex color string, as used in html, eg, '#eeefff'.
If it is a len(3) tuple, assume it's an rgb value where r,g,b in
[0,1].
- axis(*v)
- axis() returns the current axis as a length a length 4 vector
axis(v) where v= [xmin xmax ymin ymax] sets the min and max of the
x and y axis limits
axis('off') turns off the axis lines and labels
- bar(*args, **kwargs)
- BAR(left, height)
Make a bar plot with rectangles at
left, left+width, 0, height
left and height are Numeric arrays
Return value is a list of Rectangle patch instances
BAR(left, height, width, bottom,
color, yerr, xerr, capsize, yoff)
xerr and yerr, if not None, will be used to generate errorbars
on the bar chart
color specifies the color of the bar
ecolor specifies the color of any errorbar
capsize determines the length in points of the error bar caps
The optional arguments color, width and bottom can be either
scalars or len(x) sequences
This enables you to use bar as the basis for stacked bar
charts, or candlestick plots
- cla()
- Clear the current axes
- clf()
- Clear the current figure
- close(*args)
- Close a figure window
close() by itself closes the current figure
close(num) closes figure number num
close(h) where h is a figure handle(instance) closes that figure
close('all') closes all the figure windows
- cohere(x, y, NFFT=256, Fs=2, detrend=<function detrend_none>, window=<function window_hanning>, noverlap=0)
- Compute the coherence between x and y. Coherence is the
normalized cross spectral density
Cxy = |Pxy|^2/(Pxx*Pyy)
The return value is (Cxy, f), where f are the frequencies of the
coherence vector. See the docs for psd and csd for information
about the function arguments NFFT, detrend, windowm noverlap, as
well as the methods used to compute Pxy, Pxx and Pyy.
Returns the tuple Cxy, freqs
Refs:
Bendat & Piersol -- Random Data: Analysis and Measurement
Procedures, John Wiley & Sons (1986)
- colorbar(ax=None, tickfmt='%1.1f')
- Create a colorbar for axes ax (default gca())
tickfmt is a format string to format the colorbar ticks
return value is the colorbar axes instance
- colors()
- This is a do nothing function to provide you with help on how
matplotlib handles colors.
Commands which take color arguments can use several formats to
specify the colors. For the basic builtin colors, you can use a
single letter
b : blue
g : green
r : red
c : cyan
m : magenta
y : yellow
k : black
w : white
For a greater range of colors, you have two options. You can
specify the color using an html hex string, as in
color = '#eeefff'
or you can pass an R,G,B tuple, where each of R,G,B are in the
range [0,1]. The example below creates a subplot with a dark
slate gray background
subplot(111, axisbg=(0.1843, 0.3098, 0.3098))
Here is an example that creates a pale turqoise title
title('Is this the best color?', color='#afeeee')
- csd(x, y, NFFT=256, Fs=2, detrend=<function detrend_none>, window=<function window_hanning>, noverlap=0)
- The cross spectral density Pxy by Welches average periodogram
method. The vectors x and y are divided into NFFT length
segments. Each segment is detrended by function detrend and
windowed by function window. noverlap gives the length of the
overlap between segments. The product of the direct FFTs of x and
y are averaged over each segment to compute Pxy, with a scaling to
correct for power loss due to windowing. Fs is the sampling
frequency.
NFFT must be a power of 2
detrend and window are functions, unlike in matlab where they are
vectors. For detrending you can use detrend_none, detrend_mean,
detrend_linear or a custom function. For windowing, you can use
window_none, window_hanning, or a custom function
Returns the tuple Pxy, freqs. Pxy is the cross spectrum (complex
valued), and 10*log10(|Pxy|) is plotted
Refs:
Bendat & Piersol -- Random Data: Analysis and Measurement
Procedures, John Wiley & Sons (1986)
- cumproduct = accumulate(...)
- accumulate performs the operation along the dimension, accumulating subtotals
- errorbar(x, y, yerr=None, xerr=None, fmt='b-', ecolor='k', capsize=3)
- Plot x versus y with error deltas in yerr and xerr.
Vertical errorbars are plotted if yerr is not None
Horizontal errorbars are plotted if xerr is not None
xerr and yerr may be any of:
a rank-0, Nx1 Numpy array - symmetric errorbars +/- value
an N-element list or tuple - symmetric errorbars +/- value
a rank-1, Nx2 Numpy array - asymmetric errorbars -column1/+column2
fmt is the plot format symbol for y
ecolor is the errorbar color specifier
Return value is a length 2 tuple. The first element is a list of
y symbol lines. The second element is a list of error bar lines.
capsize is the size of the error bar caps in points
- figlegend(handles, labels, loc)
- Place a legend in the figure. Labels are a sequence of
strings, handles is a sequence of line or patch instances, and
loc can be a string or an integer specifying the legend
location
USAGE:
legend( (line1, line2, line3),
('label1', 'label2', 'label3'),
'upper right')
See help(legend) for information about the location codes
- figure(num=1, figsize=None, dpi=None, facecolor=None, edgecolor=None, frameon=True)
- figure(num = 1, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k')
Create a new figure and return a handle to it
If figure(num) already exists, make it active and return the
handle to it.
figure(1)
figsize - width in height x inches; defaults to rc figure.figsize
dpi - resolution; defaults to rc figure.dpi
facecolor - the background color; defaults to rc figure.facecolor
edgecolor - the border color; defaults to rc figure.edgecolor
rcParams gives the default values from the .matplotlibrc file
- fill(*args, **kwargs)
- plot filled polygons. *args is a variable length argument,
allowing for multiple x,y pairs with an optional color format
string. For example, all of the following are legal, assuming a
is the Axis instance:
fill(x,y) # plot polygon with vertices at x,y
fill(x,y, 'b' ) # plot polygon with vertices at x,y in blue
An arbitrary number of x, y, color groups can be specified, as in
fill(x1, y1, 'g', x2, y2, 'r')
Return value is a list of patches that were added
The following color strings are supported
b : blue
g : green
r : red
c : cyan
m : magenta
y : yellow
k : black
w : white
The kwargs that are can be used to set line properties (any
property that has a set_* method). You can use this to set edge
color, face color, etc.
Example code:
from matplotlib.matlab import *
t = arange(0.0, 1.01, 0.01)
s = sin(2*2*pi*t)
fill(t, s, 'r')
grid(True)
show()
- gca()
- Return the current axis instance. This can be used to control
axis properties either using set or the Axes methods.
Example:
plot(t,s)
set(gca(), 'xlim', [0,10]) # set the x axis limits
or
plot(t,s)
a = gca()
a.set_xlim([0,10]) # does the same
- gcf()
- Return a handle to the current figure
- get(o, s)
- Return the value of handle property s
h is an instance of a class, eg a Line2D or an Axes or Text.
if s is 'somename', this function returns
o.get_somename()
- get_current_fig_manager()
- get_plot_commands()
- grid(b)
- Set the figure grid to be on or off (b is a boolean)
- hist(x, bins=10, noplot=0, normed=0, bottom=0)
- Compute the histogram of x. bins is either an integer number of
bins or a sequence giving the bins. x are the data to be binned.
if noplot is True, just compute the histogram and return the
number of observations and the bins as an (n, bins) tuple.
If noplot is False, compute the histogram and plot it, returning
n, bins, patches
If normed is true, the first element of the return tuple will be the
counts normalized to form a probability distribtion, ie,
n/(len(x)*dbin)
To control the properties of the returned patches, you can can
call any of the patch methods on those patches; see
matplotlib.patches and matplotlib.artist (the base class for
patches). Eg
n, bins, patches = hist(x, 50, normed=1)
set(patches, 'facecolor', 'g', 'alpha', 0.75)
- hlines(*args, **kwargs)
- lines = hlines(self, y, xmin, xmax, fmt='k-')
plot horizontal lines at each y from xmin to xmax. xmin or
xmax can be scalars or len(x) numpy arrays. If they are
scalars, then the respective values are constant, else the
widths of the lines are determined by xmin and xmax
Returns a list of line instances that were added
- hold(b=None)
- Set the hold state. If hold is None (default), toggle the
hold state. Else set the hold state to boolean value b.
Eg
hold() # toggle hold
hold(True) # hold is on
hold(False) # hold is off
- imshow(*args, **kwargs)
- Display the image in array X to current axes. X must be a
float array
Usage:
IMSHOW(X)
If X is MxN, assume luminance (grayscale)
If X is MxNx3, assume RGB
If X is MxNx4, assume RGBA
IMSHOW(X, cmap)
cmap is a colors.Colormap instance used to make a pseudo-color plot
An Image instance is returned
- legend(*args, **kwargs)
- Place a legend on the current axes at location loc. Labels are a
sequence of strings and loc can be a string or an integer
specifying the legend location
USAGE:
Make a legend with existing lines
legend( LABELS )
>>> legend( ('label1', 'label2', 'label3') )
Make a legend for Line2D instances lines1, line2, line3
legend( LINES, LABELS )
>>> legend( (line1, line2, line3), ('label1', 'label2', 'label3') )
Make a legend at LOC
legend( LABELS, LOC ) or
legend( LINES, LABELS, LOC )
>>> legend( ('label1', 'label2', 'label3'), loc='upper left')
>>> legend( (line1, line2, line3),
('label1', 'label2', 'label3'),
loc=2)
The LOC location codes are
The LOC location codes are
'best' : 0, (currently not supported, defaults to upper right)
'upper right' : 1, (default)
'upper left' : 2,
'lower left' : 3,
'lower right' : 4,
'right' : 5,
'center left' : 6,
'center right' : 7,
'lower center' : 8,
'upper center' : 9,
'center' : 10,
If none of these are suitable, loc can be a 2-tuple giving x,y
in axes coords, ie,
loc = 0, 1 is left top
loc = 0.5, 0.5 is center, center
and so on
The legend instance is returned
- load(fname)
- Load ASCII data from fname into an array and return the array.
The data must be regular, same number of values in every row
fname can be a filename or a file handle
matfile data is not currently supported, but see
Nigel Wade's matfile ftp://ion.le.ac.uk/matfile/matfile.tar.gz
Example usage:
x,y = load('test.dat') # data in two columns
X = load('test.dat') # a matrix of data
x = load('test.dat') # a single column of data
- loglog(*args, **kwargs)
- Make a loglog plot with log scaling on the a and y axis. The args
to semilog x are the same as the args to plot. See help plot for
more info
- pcolor(*args, **kwargs)
- pcolor_patch(C) - make a pseudocolor plot of matrix C
pcolor(X, Y, C) - a pseudo color plot of C on the matrices X and Y
Shading:
The optional keyword arg shading ('flat' or 'faceted') will
determine whether the black grid is drawn around each pcolor
square. Defaul 'faceteted'
e.g.,
pcolor(C, shading='flat')
pcolor(X, Y, C, shading='faceted')
Return value is a matplotlib.collections.PolyCollection object
Note, the behavior of meshgrid in matlab is a bit
counterintuitive for x and y arrays. For example,
x = arange(7)
y = arange(5)
X, Y = meshgrid(x,y)
Z = rand( len(x), len(y))
pcolor(X, Y, Z)
will fail in matlab and matplotlib. You will probably be
happy with
pcolor(X, Y, transpose(Z))
Likewise, for nonsquare Z,
pcolor(transpose(Z))
will make the x and y axes in the plot agree with the numrows
and numcols of Z
- pcolor_classic(*args, **kwargs)
- pcolor_classic(C) - make a pseudocolor plot of matrix C
pcolor_classic(X, Y, C) - a pseudo color plot of C on the matrices X and Y
Shading:
The optional keyword arg shading ('flat' or 'faceted') will
determine whether the black grid is drawn around each pcolor
square. Defaul 'faceteted'
e.g.,
pcolor_classic(C, shading='flat')
pcolor_classic(X, Y, C, shading='faceted')
returns a list of patch objects.
Note, the behavior of meshgrid in matlab is a bit
counterintuitive for x and y arrays. For example,
x = arange(7)
y = arange(5)
X, Y = meshgrid(x,y)
Z = rand( len(x), len(y))
pcolor(X, Y, Z)
will fail in matlab and matplotlib. You will probably be
happy with
pcolor_classic(X, Y, transpose(Z))
Likewise, for nonsquare Z,
pcolor_classic(transpose(Z))
will make the x and y axes in the plot agree with the numrows
and numcols of Z
- plot(*args, **kwargs)
- plot lines. *args is a variable length argument, allowing for
multiple x, y pairs with an optional format string. For
example, all of the following are legal
plot(x,y) # plot Numeric arrays y vs x
plot(x,y, 'bo') # plot Numeric arrays y vs x with blue circles
plot(y) # plot y using x = arange(len(y))
plot(y, 'r+') # ditto with red plusses
An arbitrary number of x, y, fmt groups can be specified, as in
plot(x1, y1, 'g^', x2, y2, 'l-')
Return value is a list of lines that were added
The following line styles are supported:
- : solid line
-- : dashed line
-. : dash-dot line
: : dotted line
. : points
, : pixels
o : circle symbols
^ : triangle up symbols
v : triangle down symbols
< : triangle left symbols
> : triangle right symbols
s : square symbols
+ : plus symbols
x : cross symbols
D : diamond symbols
d : thin diamond symbols
1 : tripod down symbols
2 : tripod up symbols
3 : tripod left symbols
4 : tripod right symbols
h : hexagon symbols
H : rotated hexagon symbols
p : pentagon symbols
| : vertical line symbols
_ : horizontal line symbols
The following color strings are supported
b : blue
g : green
r : red
c : cyan
m : magenta
y : yellow
k : black
w : white
Line styles and colors are combined in a single format string
The kwargs that are can be used to set line properties (any
property that has a set_* method). You can use this to set a line
label (for auto legends), linewidth, anitialising, marker face
color, etc. Here is an example:
plot([1,2,3], [1,2,3], 'go-', label='line 1', linewidth=2)
plot([1,2,3], [1,4,9], 'rs', label='line 2')
axis([0, 4, 0, 10])
legend()
If you make multiple lines with one plot command, the kwargs apply
to all those lines, eg
plot(x1, y1, x2, y2, antialising=False)
Neither line will be antialiased.
- plot_date(*args, **kwargs)
- PLOT_DATE(d, y, converter, fmt='bo', **kwargs)
d is a sequence of dates; converter is a dates.DateConverter
instance that converts your dates to seconds since the epoch for
plotting. y are the y values at those dates. fmt is a plot
format string. kwargs are passed on to plot. See plot for more
information.
pass converter = None if your dates are already in epoch format
- plotting()
- Plotting commands
axes - Create a new axes
axis - Set or return the current axis limits
bar - make a bar chart
cla - clear current axes
clf - clear a figure window
close - close a figure window
colorbar - add a colorbar to the current figure
cohere - make a plot of coherence
csd - make a plot of cross spectral density
errorbar - make an errorbar graph
figlegend - add a legend to the figure
figure - create or change active figure
fill - make filled polygons
gca - return the current axes
gcf - return the current figure
get - get a handle graphics property
hist - make a histogram
hold - set the hold state on current axes
legend - add a legend to the axes
loglog - a log log plot
imshow - plot image data
pcolor - make a pseudocolor plot
plot - make a line plot
psd - make a plot of power spectral density
savefig - save the current figure
scatter - make a scatter plot
set - set a handle graphics property
semilogx - log x axis
semilogy - log y axis
show - show the figures
specgram - a spectrogram plot
stem - make a stem plot
subplot - make a subplot (numrows, numcols, axesnum)
table - add a table to the axes
text - add some text at location x,y to the current axes
title - add a title to the current axes
xlabel - add an xlabel to the current axes
ylabel - add a ylabel to the current axes
- product = reduce(...)
- reduce performs the operation along the specified dimension, eliminating it. Returns scalars rather than rank-0 numarray.
- psd(x, NFFT=256, Fs=2, detrend=<function detrend_none>, window=<function window_hanning>, noverlap=0)
- The power spectral density by Welches average periodogram method.
The vector x is divided into NFFT length segments. Each segment
is detrended by function detrend and windowed by function window.
noperlap gives the length of the overlap between segments. The
absolute(fft(segment))**2 of each segment are averaged to compute Pxx,
with a scaling to correct for power loss due to windowing. Fs is
the sampling frequency.
-- NFFT must be a power of 2
-- detrend and window are functions, unlike in matlab where they
are vectors. For detrending you can use detrend_none,
detrend_mean, detrend_linear or a custom function. For
windowing, you can use window_none, window_hanning, or a custom
function
-- if length x < NFFT, it will be zero padded to NFFT
Returns the tuple Pxx, freqs
For plotting, the power is plotted as 10*log10(pxx)) for decibels,
though pxx itself is returned
Refs:
Bendat & Piersol -- Random Data: Analysis and Measurement
Procedures, John Wiley & Sons (1986)
- raise_msg_to_str(msg)
- msg is a return arg from a raise. Join with new lines
- rc(group, **kwargs)
- Set the current rc params. Group is the grouping for the rc, eg
for lines.linewidth the group is 'lines', for axes.facecolor, the
group is 'axes', and so on. kwargs is a list of attribute
name/value pairs, eg
rc('lines', linewidth=2, color='r')
sets the current rc params and is equivalent to
rcParams['lines.linewidth'] = 2
rcParams['lines.color'] = 'r'
The following aliases are available to save typing for interactive
users
'lw' : 'linewidth'
'ls' : 'linestyle'
'c' : 'color'
'fc' : 'facecolor'
'ec' : 'edgecolor'
'mfc' : 'markerfacecolor'
'mec' : 'markeredgecolor'
'mew' : 'markeredgewidth'
'aa' : 'antialiased'
'l' : 'lines'
'a' : 'axes'
'f' : 'figure'
'p' : 'patches'
'g' : 'grid'
Thus you could abbreviate the above rc command as
rc('l', lw=2, c='r')
Note you can use python's kwargs dictionary facility to store
dictionaries of default parameters. Eg, you can customize the
font rc as follows
font = {'family' : 'monospace',
'weight' : 'bold',
'size' : 'larger',
}
rc('font', **font) # pass in the font dict as kwargs
This enables you to easily switch between several configurations.
Use rcdefaults to restore the default rc params after changes.
- rcdefaults()
- Restore the default rc params - the ones that were created at
matplotlib load time
- save(fname, X, fmt='%1.4f')
- Save the data in X to file fname using fmt string to convert the
data to strings
fname can be a filename or a file handle
Example usage:
save('test.out', X) # X is an array
save('test1.out', (x,y,z)) # x,y,z equal sized 1D arrays
save('test2.out', x) # x is 1D
save('test3.out', x, fmt='%1.4e') # use exponential notation
- savefig(*args, **kwargs)
- def savefig(fname, dpi=150, facecolor='w', edgecolor='w',
orientation='portrait'):
Save the current figure to filename fname. dpi is the resolution
in dots per inch.
Output file types currently supported are jpeg and png and will be
deduced by the extension to fname
facecolor and edgecolor are the colors os the figure rectangle
orientation is either 'landscape' or 'portrait' - not supported on
all backends; currently only on postscript output.
- scatter(*args, **kwargs)
- scatter(self, x, y, s=None, c='b'):
Make a scatter plot of x versus y. s is a size (in data
coords) and can be either a scalar or an array of the same
length as x or y. c is a color and can be a single color
format string or an length(x) array of intensities which will
be mapped by the colormap jet.
If size is None a default size will be used
- scatter_classic(*args, **kwargs)
- scatter_classic(self, x, y, s=None, c='b'):
Make a scatter plot of x versus y. s is a size (in data
coords) and can be either a scalar or an array of the same
length as x or y. c is a color and can be a single color
format string or an length(x) array of intensities which will
be mapped by the colormap jet.
If size is None a default size will be used
- semilogx(*args, **kwargs)
- Make a semilog plot with log scaling on the x axis. The args to
semilog x are the same as the args to plot. See help plot for
more info
- semilogy(*args, **kwargs)
- Make a semilog plot with log scaling on the y axis. The args to
semilog x are the same as the args to plot. See help plot for
more info
- set(h, *args, **kwargs)
- Set handle h property in string s to value val
h can be a handle or vector of handles.
h is an instance (or vector of instances) of a class, eg a Line2D
or an Axes or Text.
args is a list of string, value pairs. if the string
is 'somename', set function calls
o.set_somename(value)
for every instance in h.
- specgram(x, NFFT=256, Fs=2, detrend=<function detrend_none>, window=<function window_hanning>, noverlap=128, cmap=<matplotlib.colors.ColormapJet instance>)
- Compute a spectrogram of data in x. Data are split into NFFT
length segements and the PSD of each section is computed. The
windowing function window is applied to each segment, and the
amount of overlap of each segment is specified with noverlap
cmap is a a matplotlib.colors.ColorMap
See help(psd) for information on the other arguments
return value is Pxx, freqs, bins, im
bins are the time points the spectrogram is calculated over
freqs is an array of frequencies
Pxx is a len(times) x len(freqs) array of power
im is a matplotlib image
- stem(*args, **kwargs)
- stem(x, y, linefmt='b-', markerfmt='bo', basefmt='r-')
A stem plot plots vertical lines (using linefmt) at each x
location from the baseline to y, and places a marker there using
markerfmt. A horizontal line at 0 is is plotted using basefmt
return value is markerline, stemlines, baseline
See
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/stem.html
for details and examples/stem_plot.py for a demo.
- subplot(*args, **kwargs)
- Create a subplot command, creating axes with
subplot(numRows, numCols, plotNum)
where plotNum=1 is the first plot number and increasing plotNums
fill rows first. max(plotNum)==numRows*numCols
You can leave out the commas if numRows<=numCols<=plotNum<10, as
in
subplot(211) # 2 rows, 1 column, first (upper) plot
subplot(111) is the default axis
The background color of the subplot can be specified via keyword
argument 'axisbg', which takes a color string or gdk.Color as value, as in
subplot(211, axisbg='y')
- sum = reduce(...)
- reduce performs the operation along the specified dimension, eliminating it. Returns scalars rather than rank-0 numarray.
- table(*args, **kwargs)
- table(cellText=None, cellColours=None,
cellLoc='right', colWidths=None,
rowLabels=None, rowColours=None, rowLoc='left',
colLabels=None, colColours=None, colLoc='center',
loc='bottom', bbox=None):
Add a table to the current axes. Returns a table instance. For
finer grained control over tables, use the Table class and add it
to the axes with add_table.
Thanks to John Gill for providing the class and table.
- text(x, y, label, fontdict=None, **kwargs)
- Add text to axis at location x,y
fontdict is a dictionary to override the default text properties.
If fontdict is None, the default is
'fontsize' : 'x-small',
'verticalalignment' : 'bottom',
'horizontalalignment' : 'left'
**kwargs can in turn be used to override the fontdict, as in
a.text(x,y,label, fontsize='medium')
This command supplies no override dict, and so will have
'verticalalignment'='bottom' and 'horizontalalignment'='left' but
the keyword arg 'fontsize' will create a fontsize of medium or 12
The purpose these options is to make it easy for you to create a
default font theme for your plots by creating a single dictionary,
and then being able to selective change individual attributes for
the varous text creation commands, as in
fonts = {
'color' : 'k',
'fontname' : 'Courier',
'fontweight' : 'bold'
}
title('My title', fonts, fontsize='medium')
xlabel('My xlabel', fonts, fontsize='small')
ylabel('My ylabel', fonts, fontsize='small')
text(12, 20, 'some text', fonts, fontsize='x-small')
The Text defaults are
'color' : 'k',
'fontname' : 'Sans',
'fontsize' : 'small',
'fontweight' : 'bold',
'fontangle' : 'normal',
'horizontalalignment' : 'left'
'rotation' : 'horizontal',
'verticalalignment' : 'bottom',
'transx' : gca().xaxis.transData,
'transy' : gca().yaxis.transData,
transx and transy specify that text is in data coords,
alternatively, you can specify text in axis coords (0,0 lower
left and 1,1 upper right). The example below places text in
the center of the axes
ax = subplot(111)
text(0.5, 0.5,'matplotlib',
horizontalalignment='center',
verticalalignment='center',
transx = ax.xaxis.transAxis,
transy = ax.yaxis.transAxis,
)
- title(s, *args, **kwargs)
- Set the title of the current axis to s
Default font override is:
override = {
'fontsize' : 'medium',
'verticalalignment' : 'bottom',
'horizontalalignment' : 'center'
}
See the text docstring for information of how override and the
optional args work
- vlines(*args, **kwargs)
- lines = vlines(x, ymin, ymax, color='k'):
Plot vertical lines at each x from ymin to ymax. ymin or ymax
can be scalars or len(x) numpy arrays. If they are scalars,
then the respective values are constant, else the heights of
the lines are determined by ymin and ymax
Returns a list of lines that were added
- xlabel(s, *args, **kwargs)
- Set the x axis label of the current axis to s
Default override is
override = {
'fontsize' : 'small',
'verticalalignment' : 'top',
'horizontalalignment' : 'center'
}
See the text docstring for information of how override and
the optional args work
- ylabel(s, *args, **kwargs)
- Set the y axis label of the current axis to s
Defaults override is
override = {
'fontsize' : 'small',
'verticalalignment' : 'center',
'horizontalalignment' : 'right',
'rotation'='vertical' : }
See the text docstring for information of how override and the
optional args work
|