Skip to content

Commit

Permalink
test automodapi
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrik-1 committed Jul 20, 2018
1 parent 4769f7b commit 9b8da51
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 17 deletions.
1 change: 1 addition & 0 deletions doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ ipywidgets
numpydoc>=0.4
pillow
sphinx-gallery>=0.1.13
sphinx-automodapi
22 changes: 10 additions & 12 deletions doc/api/transformations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@
transformations
***************

.. inheritance-diagram:: matplotlib.transforms matplotlib.path
:parts: 1

:mod:`matplotlib.transforms`
=============================
============================

.. automodule:: matplotlib.transforms
:members: TransformNode, BboxBase, Bbox, TransformedBbox, Transform,
TransformWrapper, AffineBase, Affine2DBase, Affine2D, IdentityTransform,
BlendedGenericTransform, BlendedAffine2D, blended_transform_factory,
CompositeGenericTransform, CompositeAffine2D,
composite_transform_factory, BboxTransform, BboxTransformTo,
BboxTransformFrom, ScaledTranslation, TransformedPath, nonsingular,
interval_contains, interval_contains_open
:show-inheritance:
:no-members:
:no-undoc-members:

.. automodapi:: matplotlib.transforms
:no-main-docstr:
:skip: affine_transform
:skip: inv
:skip: Path
:skip: count_bboxes_overlapping_bbox
:skip: update_path_extents
3 changes: 3 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx_automodapi.automodapi',
'sphinx.ext.doctest',
'sphinx.ext.inheritance_diagram',
'sphinx.ext.intersphinx',
Expand All @@ -48,6 +49,8 @@

exclude_patterns = ['api/api_changes/*', 'users/whats_new/*']

automodapi_toctreedirnm = 'api/_as_gen'
automodsumm_inherited_members = True

def _check_deps():
names = {"colorspacious": 'colorspacious',
Expand Down
20 changes: 15 additions & 5 deletions lib/matplotlib/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,9 @@ def to_values(self):
def matrix_from_values(a, b, c, d, e, f):
"""
(staticmethod) Create a new transformation matrix as a 3x3
numpy array of the form::
numpy array of the form:
::
a c e
b d f
Expand Down Expand Up @@ -1869,7 +1871,9 @@ class Affine2D(Affine2DBase):

def __init__(self, matrix=None, **kwargs):
"""
Initialize an Affine transform from a 3x3 numpy float array::
Initialize an Affine transform from a 3x3 numpy float array:
::
a c e
b d f
Expand All @@ -1894,7 +1898,9 @@ def __str__(self):
def from_values(a, b, c, d, e, f):
"""
(staticmethod) Create a new Affine2D instance from the given
values::
values:
::
a c e
b d f
Expand All @@ -1907,7 +1913,9 @@ def from_values(a, b, c, d, e, f):

def get_matrix(self):
"""
Get the underlying transformation matrix as a 3x3 numpy array::
Get the underlying transformation matrix as a 3x3 numpy array:
::
a c e
b d f
Expand All @@ -1920,7 +1928,9 @@ def get_matrix(self):

def set_matrix(self, mtx):
"""
Set the underlying transformation matrix from a 3x3 numpy array::
Set the underlying transformation matrix from a 3x3 numpy array:
::
a c e
b d f
Expand Down

0 comments on commit 9b8da51

Please sign in to comment.