| Home | Trees | Indices | Help |
|
|---|
|
|
| Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
| Class Variables | |
|
Inherited from Inherited from |
| Properties | |
|
Inherited from |
| Method Details |
|
|
|
Given the 2D view coordinates attempt to guess a 3D coordinate Looks for the nearest edge to the point and then assumes that the point is at the same z location as the nearest point on the edge.
|
|
|
|
Plot lines and/or markers to the
:class:`~matplotlib.axes.Axes`. *args* is a variable length
argument, allowing for multiple *x*, *y* pairs with an
optional format string. For example, each of the following is
legal::
plot(x, y) # plot x and y using default line style and color
plot(x, y, 'bo') # plot x and y using blue circle markers
plot(y) # plot y using x as index array 0..N-1
plot(y, 'r+') # ditto, but with red plusses
If *x* and/or *y* is 2-dimensional, then the corresponding columns
will be plotted.
An arbitrary number of *x*, *y*, *fmt* groups can be
specified, as in::
a.plot(x1, y1, 'g^', x2, y2, 'g-')
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
* # star 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
steps # use gnuplot style 'steps' # kwarg only
The following color abbreviations are supported::
b # blue
g # green
r # red
c # cyan
m # magenta
y # yellow
k # black
w # white
In addition, you can specify colors in many weird and
wonderful ways, including full names (``'green'``), hex
strings (``'#008000'``), RGB or RGBA tuples (``(0,1,0,1)``) or
grayscale intensities as a string (``'0.8'``). Of these, the
string specifications can be used in place of a ``fmt`` group,
but the tuple forms can be used only as ``kwargs``.
Line styles and colors are combined in a single format string, as in
``'bo'`` for blue circles.
The *kwargs* 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, e.g.::
plot(x1, y1, x2, y2, antialised=False)
Neither line will be antialiased.
The kwargs are :class:`~matplotlib.lines.Line2D` properties:
============================================================================ ========================================================================================================================================================================================================================================================================
Property Description
============================================================================ ========================================================================================================================================================================================================================================================================
:meth:`alpha <matplotlib.artist.Artist.set_alpha>` float (0.0 transparent through 1.0 opaque)
:meth:`animated <matplotlib.artist.Artist.set_animated>` [True | False]
:meth:`antialiased <matplotlib.lines.Line2D.set_antialiased>` or aa [True | False]
:meth:`axes <matplotlib.lines.Line2D.set_axes>` an :class:`~matplotlib.axes.Axes` instance
:meth:`clip_box <matplotlib.artist.Artist.set_clip_box>` a :class:`matplotlib.transforms.Bbox` instance
:meth:`clip_on <matplotlib.artist.Artist.set_clip_on>` [True | False]
:meth:`clip_path <matplotlib.artist.Artist.set_clip_path>` [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ]
:meth:`color <matplotlib.lines.Line2D.set_color>` or c any matplotlib color
:meth:`contains <matplotlib.artist.Artist.set_contains>` a callable function
:meth:`dash_capstyle <matplotlib.lines.Line2D.set_dash_capstyle>` ['butt' | 'round' | 'projecting']
:meth:`dash_joinstyle <matplotlib.lines.Line2D.set_dash_joinstyle>` ['miter' | 'round' | 'bevel']
:meth:`dashes <matplotlib.lines.Line2D.set_dashes>` sequence of on/off ink in points
:meth:`data <matplotlib.lines.Line2D.set_data>` 2D array
:meth:`drawstyle <matplotlib.lines.Line2D.set_drawstyle>` [ 'default' | 'steps' | 'steps-pre' | 'steps-mid' | 'steps-post' ]
:meth:`figure <matplotlib.artist.Artist.set_figure>` a :class:`matplotlib.figure.Figure` instance
:meth:`label <matplotlib.artist.Artist.set_label>` any string
:meth:`linestyle <matplotlib.lines.Line2D.set_linestyle>` or ls [ '-' | '--' | '-.' | ':' | 'None' | ' ' | '' ] and any drawstyle in combination with a linestyle, e.g. 'steps--'.
:meth:`linewidth <matplotlib.lines.Line2D.set_linewidth>` or lw float value in points
:meth:`lod <matplotlib.artist.Artist.set_lod>` [True | False]
:meth:`marker <matplotlib.lines.Line2D.set_marker>` [ '+' | '*' | ',' | '.' | '1' | '2' | '3' | '4' | '<' | '>' | 'D' | 'H' | '^' | '_' | 'd' | 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|' | TICKUP | TICKDOWN | TICKLEFT | TICKRIGHT | 'None' | ' ' | '' ]
:meth:`markeredgecolor <matplotlib.lines.Line2D.set_markeredgecolor>` or mec any matplotlib color
:meth:`markeredgewidth <matplotlib.lines.Line2D.set_markeredgewidth>` or mew float value in points
:meth:`markerfacecolor <matplotlib.lines.Line2D.set_markerfacecolor>` or mfc any matplotlib color
:meth:`markersize <matplotlib.lines.Line2D.set_markersize>` or ms float
:meth:`picker <matplotlib.lines.Line2D.set_picker>` float distance in points or callable pick function ``fn(artist, event)``
:meth:`pickradius <matplotlib.lines.Line2D.set_pickradius>` float distance in points
:meth:`solid_capstyle <matplotlib.lines.Line2D.set_solid_capstyle>` ['butt' | 'round' | 'projecting']
:meth:`solid_joinstyle <matplotlib.lines.Line2D.set_solid_joinstyle>` ['miter' | 'round' | 'bevel']
:meth:`transform <matplotlib.lines.Line2D.set_transform>` a :class:`matplotlib.transforms.Transform` instance
:meth:`url <matplotlib.artist.Artist.set_url>` unknown
:meth:`visible <matplotlib.artist.Artist.set_visible>` [True | False]
:meth:`xdata <matplotlib.lines.Line2D.set_xdata>` 1D array
:meth:`ydata <matplotlib.lines.Line2D.set_ydata>` 1D array
:meth:`zorder <matplotlib.artist.Artist.set_zorder>` any number
============================================================================ ========================================================================================================================================================================================================================================================================
kwargs *scalex* and *scaley*, if defined, are passed on to
:meth:`~matplotlib.axes.Axes.autoscale_view` to determine
whether the *x* and *y* axes are autoscaled; the default is
*True*.
|
call signature::
set_xlabel(xlabel, fontdict=None, **kwargs)
Set the label for the xaxis.
Valid kwargs are Text properties:
=================================================================================== =========================================================================================================================================================================================================
Property Description
=================================================================================== =========================================================================================================================================================================================================
:meth:`alpha <matplotlib.artist.Artist.set_alpha>` float (0.0 transparent through 1.0 opaque)
:meth:`animated <matplotlib.artist.Artist.set_animated>` [True | False]
:meth:`axes <matplotlib.artist.Artist.set_axes>` an :class:`~matplotlib.axes.Axes` instance
:meth:`backgroundcolor <matplotlib.text.Text.set_backgroundcolor>` any matplotlib color
:meth:`bbox <matplotlib.text.Text.set_bbox>` rectangle prop dict
:meth:`clip_box <matplotlib.artist.Artist.set_clip_box>` a :class:`matplotlib.transforms.Bbox` instance
:meth:`clip_on <matplotlib.artist.Artist.set_clip_on>` [True | False]
:meth:`clip_path <matplotlib.artist.Artist.set_clip_path>` [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ]
:meth:`color <matplotlib.text.Text.set_color>` any matplotlib color
:meth:`contains <matplotlib.artist.Artist.set_contains>` a callable function
:meth:`family <matplotlib.text.Text.set_family>` or fontfamily or fontname or name [ FONTNAME | 'serif' | 'sans-serif' | 'cursive' | 'fantasy' | 'monospace' ]
:meth:`figure <matplotlib.artist.Artist.set_figure>` a :class:`matplotlib.figure.Figure` instance
:meth:`fontproperties <matplotlib.text.Text.set_fontproperties>` or font_properties a :class:`matplotlib.font_manager.FontProperties` instance
:meth:`horizontalalignment <matplotlib.text.Text.set_horizontalalignment>` or ha [ 'center' | 'right' | 'left' ]
:meth:`label <matplotlib.artist.Artist.set_label>` any string
:meth:`linespacing <matplotlib.text.Text.set_linespacing>` float (multiple of font size)
:meth:`lod <matplotlib.artist.Artist.set_lod>` [True | False]
:meth:`multialignment <matplotlib.text.Text.set_multialignment>` ['left' | 'right' | 'center' ]
:meth:`picker <matplotlib.artist.Artist.set_picker>` [None|float|boolean|callable]
:meth:`position <matplotlib.text.Text.set_position>` (x,y)
:meth:`rotation <matplotlib.text.Text.set_rotation>` [ angle in degrees | 'vertical' | 'horizontal' ]
:meth:`size <matplotlib.text.Text.set_size>` or fontsize [ size in points | 'xx-small' | 'x-small' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large' ]
:meth:`stretch <matplotlib.text.Text.set_stretch>` or fontstretch [ a numeric value in range 0-1000 | 'ultra-condensed' | 'extra-condensed' | 'condensed' | 'semi-condensed' | 'normal' | 'semi-expanded' | 'expanded' | 'extra-expanded' | 'ultra-expanded' ]
:meth:`style <matplotlib.text.Text.set_style>` or fontstyle [ 'normal' | 'italic' | 'oblique']
:meth:`text <matplotlib.text.Text.set_text>` string or anything printable with '%s' conversion.
:meth:`transform <matplotlib.artist.Artist.set_transform>` :class:`~matplotlib.transforms.Transform` instance
:meth:`url <matplotlib.artist.Artist.set_url>` unknown
:meth:`variant <matplotlib.text.Text.set_variant>` or fontvariant [ 'normal' | 'small-caps' ]
:meth:`verticalalignment <matplotlib.text.Text.set_verticalalignment>` or va or ma [ 'center' | 'top' | 'bottom' | 'baseline' ]
:meth:`visible <matplotlib.artist.Artist.set_visible>` [True | False]
:meth:`weight <matplotlib.text.Text.set_weight>` or fontweight [ a numeric value in range 0-1000 | 'ultralight' | 'light' | 'normal' | 'regular' | 'book' | 'medium' | 'roman' | 'semibold' | 'demibold' | 'demi' | 'bold' | 'heavy' | 'extra bold' | 'black' ]
:meth:`x <matplotlib.text.Text.set_x>` float
:meth:`y <matplotlib.text.Text.set_y>` float
:meth:`zorder <matplotlib.artist.Artist.set_zorder>` any number
=================================================================================== =========================================================================================================================================================================================================
ACCEPTS: str
.. seealso::
:meth:`text`:
for information on how override and the optional args work
|
call signature::
set_ylabel(ylabel, fontdict=None, **kwargs)
Set the label for the yaxis
Valid kwargs are Text properties:
=================================================================================== =========================================================================================================================================================================================================
Property Description
=================================================================================== =========================================================================================================================================================================================================
:meth:`alpha <matplotlib.artist.Artist.set_alpha>` float (0.0 transparent through 1.0 opaque)
:meth:`animated <matplotlib.artist.Artist.set_animated>` [True | False]
:meth:`axes <matplotlib.artist.Artist.set_axes>` an :class:`~matplotlib.axes.Axes` instance
:meth:`backgroundcolor <matplotlib.text.Text.set_backgroundcolor>` any matplotlib color
:meth:`bbox <matplotlib.text.Text.set_bbox>` rectangle prop dict
:meth:`clip_box <matplotlib.artist.Artist.set_clip_box>` a :class:`matplotlib.transforms.Bbox` instance
:meth:`clip_on <matplotlib.artist.Artist.set_clip_on>` [True | False]
:meth:`clip_path <matplotlib.artist.Artist.set_clip_path>` [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ]
:meth:`color <matplotlib.text.Text.set_color>` any matplotlib color
:meth:`contains <matplotlib.artist.Artist.set_contains>` a callable function
:meth:`family <matplotlib.text.Text.set_family>` or fontfamily or fontname or name [ FONTNAME | 'serif' | 'sans-serif' | 'cursive' | 'fantasy' | 'monospace' ]
:meth:`figure <matplotlib.artist.Artist.set_figure>` a :class:`matplotlib.figure.Figure` instance
:meth:`fontproperties <matplotlib.text.Text.set_fontproperties>` or font_properties a :class:`matplotlib.font_manager.FontProperties` instance
:meth:`horizontalalignment <matplotlib.text.Text.set_horizontalalignment>` or ha [ 'center' | 'right' | 'left' ]
:meth:`label <matplotlib.artist.Artist.set_label>` any string
:meth:`linespacing <matplotlib.text.Text.set_linespacing>` float (multiple of font size)
:meth:`lod <matplotlib.artist.Artist.set_lod>` [True | False]
:meth:`multialignment <matplotlib.text.Text.set_multialignment>` ['left' | 'right' | 'center' ]
:meth:`picker <matplotlib.artist.Artist.set_picker>` [None|float|boolean|callable]
:meth:`position <matplotlib.text.Text.set_position>` (x,y)
:meth:`rotation <matplotlib.text.Text.set_rotation>` [ angle in degrees | 'vertical' | 'horizontal' ]
:meth:`size <matplotlib.text.Text.set_size>` or fontsize [ size in points | 'xx-small' | 'x-small' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large' ]
:meth:`stretch <matplotlib.text.Text.set_stretch>` or fontstretch [ a numeric value in range 0-1000 | 'ultra-condensed' | 'extra-condensed' | 'condensed' | 'semi-condensed' | 'normal' | 'semi-expanded' | 'expanded' | 'extra-expanded' | 'ultra-expanded' ]
:meth:`style <matplotlib.text.Text.set_style>` or fontstyle [ 'normal' | 'italic' | 'oblique']
:meth:`text <matplotlib.text.Text.set_text>` string or anything printable with '%s' conversion.
:meth:`transform <matplotlib.artist.Artist.set_transform>` :class:`~matplotlib.transforms.Transform` instance
:meth:`url <matplotlib.artist.Artist.set_url>` unknown
:meth:`variant <matplotlib.text.Text.set_variant>` or fontvariant [ 'normal' | 'small-caps' ]
:meth:`verticalalignment <matplotlib.text.Text.set_verticalalignment>` or va or ma [ 'center' | 'top' | 'bottom' | 'baseline' ]
:meth:`visible <matplotlib.artist.Artist.set_visible>` [True | False]
:meth:`weight <matplotlib.text.Text.set_weight>` or fontweight [ a numeric value in range 0-1000 | 'ultralight' | 'light' | 'normal' | 'regular' | 'book' | 'medium' | 'roman' | 'semibold' | 'demibold' | 'demi' | 'bold' | 'heavy' | 'extra bold' | 'black' ]
:meth:`x <matplotlib.text.Text.set_x>` float
:meth:`y <matplotlib.text.Text.set_y>` float
:meth:`zorder <matplotlib.artist.Artist.set_zorder>` any number
=================================================================================== =========================================================================================================================================================================================================
ACCEPTS: str
.. seealso::
:meth:`text`:
for information on how override and the optional args work
|
|
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Tue Mar 17 14:20:01 2009 | http://epydoc.sourceforge.net |