diff --git a/doc/_templates/autoclass.rst b/doc/_templates/autoclass.rst new file mode 100644 index 000000000000..79f42825d501 --- /dev/null +++ b/doc/_templates/autoclass.rst @@ -0,0 +1,27 @@ +{{ fullname | escape | underline }} + +.. currentmodule:: {{ module }} + +.. autoclass:: {{ objname }} + :no-members: + :show-inheritance: + + {% if '__init__' in methods %} + {% set caught_result = methods.remove('__init__') %} + {% endif %} + + {% block methods %} + {% if methods %} + + .. rubric:: Methods + + .. autosummary:: + :template: autosummary.rst + :toctree: + :nosignatures: + {% for item in methods %} + ~{{ name }}.{{ item }} + {% endfor %} + + {% endif %} + {% endblock %} \ No newline at end of file diff --git a/doc/_templates/autoclass_onefile.rst b/doc/_templates/autoclass_onefile.rst new file mode 100644 index 000000000000..9fa49688f794 --- /dev/null +++ b/doc/_templates/autoclass_onefile.rst @@ -0,0 +1,57 @@ +.. contents:: Table of Contents + :depth: 2 + :local: + :backlinks: entry + :class: multicol-toc + +{{ fullname | escape | underline }} + +.. currentmodule:: {{ module }} + +.. autoclass:: {{ objname }} + :no-members: + :show-inheritance: + + {% if '__init__' in methods %} + {% set caught_result = methods.remove('__init__') %} + {% endif %} + + {% block methods %} + {% if methods %} + +Methods +^^^^^^^ + + .. autosummary:: + :nosignatures: + {% for item in methods %} + ~{{ name }}.{{ item }} + {% endfor %} + + {% endif %} + {% endblock %} + +Documentation +============= + +.. autoclass:: {{ objname }} + :members: + :undoc-members: + :inherited-members: + :show-inheritance: + +Examples +======== + +.. include:: {{module}}.{{name}}.examples +{% block examples %} +{% if members %} +{% for item in members %} +.. include:: {{module}}.{{name}}.{{item}}.examples +.. raw:: html + +
+{% endfor %} +{% endif %} +{% endblock %} + diff --git a/doc/api/collections_api.rst b/doc/api/collections_api.rst index 166dc3690c08..86a6c92dae9c 100644 --- a/doc/api/collections_api.rst +++ b/doc/api/collections_api.rst @@ -9,8 +9,32 @@ collections :mod:`matplotlib.collections` ============================= +.. currentmodule:: matplotlib.collections + .. automodule:: matplotlib.collections - :members: - :undoc-members: - :show-inheritance: - :inherited-members: + :no-members: + +Classes +------- + +.. autosummary:: + :toctree: _as_gen/ + :template: autoclass.rst + :nosignatures: + + AsteriskPolygonCollection + BrokenBarHCollection + CircleCollection + Collection + EllipseCollection + EventCollection + LineCollection + PatchCollection + PathCollection + PolyCollection + QuadMesh + RegularPolyCollection + StarPolygonCollection + TriMesh + + diff --git a/doc/api/figure_api.rst b/doc/api/figure_api.rst index e6fee3334f33..838b14b16c81 100644 --- a/doc/api/figure_api.rst +++ b/doc/api/figure_api.rst @@ -17,7 +17,7 @@ Classes .. autosummary:: :toctree: _as_gen/ - :template: autosummary.rst + :template: autoclass_onefile.rst :nosignatures: AxesStack