【Python】matplotlib
24541 ワード
>>> help(matplotlib)
>>> help(matplotlib)
Help on package matplotlib:
NAME
matplotlib - An object-oriented plotting library.
DESCRIPTION
A procedural interface is provided by the companion pyplot module,
which may be imported directly, e.g.::
import matplotlib.pyplot as plt
or using ipython::
ipython
at your terminal, followed by::
In [1]: %matplotlib
In [2]: import matplotlib.pyplot as plt
at the ipython shell prompt.
For the most part, direct use of the object-oriented library is encouraged when
programming; pyplot is primarily for working interactively. The exceptions are
the pyplot functions `.pyplot.figure`, `.pyplot.subplot`, `.pyplot.subplots`,
and `.pyplot.savefig`, which can greatly simplify scripting.
Modules include:
:mod:`matplotlib.axes`
The `~.axes.Axes` class. Most pyplot functions are wrappers for
`~.axes.Axes` methods. The axes module is the highest level of OO
access to the library.
:mod:`matplotlib.figure`
The `.Figure` class.
:mod:`matplotlib.artist`
The `.Artist` base class for all classes that draw things.
:mod:`matplotlib.lines`
The `.Line2D` class for drawing lines and markers.
:mod:`matplotlib.patches`
Classes for drawing polygons.
:mod:`matplotlib.text`
The `.Text` and `.Annotation` classes.
:mod:`matplotlib.image`
The `.AxesImage` and `.FigureImage` classes.
:mod:`matplotlib.collections`
Classes for efficient drawing of groups of lines or polygons.
:mod:`matplotlib.colors`
Color specifications and making colormaps.
:mod:`matplotlib.cm`
Colormaps, and the `.ScalarMappable` mixin class for providing color
mapping functionality to other classes.
:mod:`matplotlib.ticker`
Calculation of tick mark locations and formatting of tick labels.
:mod:`matplotlib.backends`
A subpackage with modules for various GUI libraries and output formats.
The base matplotlib namespace includes:
`~matplotlib.rcParams`
Default configuration settings; their defaults may be overridden using
a :file:`matplotlibrc` file.
`~matplotlib.use`
Setting the Matplotlib backend. This should be called before any
figure is created, because it is not possible to switch between
different GUI backends after that.
Matplotlib was initially written by John D. Hunter (1968-2012) and is now
developed and maintained by a host of others.
Occasionally the internal documentation (python docstrings) will refer
to MATLAB®, a registered trademark of The MathWorks, Inc.
PACKAGE CONTENTS
_animation_data
_cm
_cm_listed
_color_data
_constrained_layout
_contour
_image
_internal_utils
_layoutbox
_mathtext_data
_path
_pylab_helpers
_qhull
_text_layout
_tri
_ttconv
_version
afm
animation
artist
axes (package)
axis
backend_bases
backend_managers
backend_tools
backends (package)
bezier
blocking_input
category
cbook (package)
cm
collections
colorbar
colors
compat (package)
container
contour
dates
docstring
dviread
figure
font_manager
fontconfig_pattern
ft2font
gridspec
hatch
image
legend
legend_handler
lines
markers
mathtext
mlab
offsetbox
patches
path
patheffects
projections (package)
pylab
pyplot
quiver
rcsetup
sankey
scale
sphinxext (package)
spines
stackplot
streamplot
style (package)
table
testing (package)
tests (package)
texmanager
text
textpath
ticker
tight_bbox
tight_layout
transforms
tri (package)
ttconv
type1font
units
widgets
CLASSES
builtins.FileNotFoundError(builtins.OSError)
ExecutableNotFoundError
builtins.dict(builtins.object)
RcParams(collections.abc.MutableMapping, builtins.dict)
collections.abc.MutableMapping(collections.abc.Mapping)
RcParams(collections.abc.MutableMapping, builtins.dict)
class ExecutableNotFoundError(builtins.FileNotFoundError)
| Error raised when an executable that Matplotlib optionally
| depends on can't be found.
|
| Method resolution order:
| ExecutableNotFoundError
| builtins.FileNotFoundError
| builtins.OSError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object (if defined)
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.FileNotFoundError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.OSError:
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Static methods inherited from builtins.OSError:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.OSError:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
| ----------------------------------------------------------------------
| Methods inherited from builtins.BaseException:
|
| __delattr__(self, name, /)
| Implement delattr(self, name).
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setattr__(self, name, value, /)
| Implement setattr(self, name, value).
|
| __setstate__(...)
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args
class RcParams(collections.abc.MutableMapping, builtins.dict)
| RcParams(*args, **kwargs)
|
| A dictionary object including validation.
|
| Validating functions are defined and associated with rc parameters in
| :mod:`matplotlib.rcsetup`.
|
| See Also
| --------
| :ref:`customizing-with-matplotlibrc-files`
|
| Method resolution order:
| RcParams
| collections.abc.MutableMapping
| collections.abc.Mapping
| collections.abc.Collection
| collections.abc.Sized
| collections.abc.Iterable
| collections.abc.Container
| builtins.dict
| builtins.object
|
| Methods defined here:
|
| __getitem__(self, key)
| x.__getitem__(y) <==> x[y]
|
| __init__(self, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __iter__(self)
| Yield sorted list of keys.
|
| __len__(self)
| Return len(self).
|
| __repr__(self)
| Return repr(self).
|
| __setitem__(self, key, val)
| Set self[key] to value.
|
| __str__(self)
| Return str(self).
|
| copy(self)
| D.copy() -> a shallow copy of D
|
| find_all(self, pattern)
| Return the subset of this RcParams dictionary whose keys match,
| using :func:`re.search`, the given ``pattern``.
|
| .. note::
|
| Changes to the returned dictionary are *not* propagated to
| the parent RcParams dictionary.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __abstractmethods__ = frozenset({'__delitem__'})
|
| validate = {'_internal.classic_mode': , 'agg.p...
|
| ----------------------------------------------------------------------
| Methods inherited from collections.abc.MutableMapping:
|
| __delitem__(self, key)
|
| clear(self)
| D.clear() -> None. Remove all items from D.
|
| pop(self, key, default=