Skip to content

Doc organize axes docs #7176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Sep 29, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DOC: more section reorganization in axis docs
  • Loading branch information
tacaswell committed Sep 26, 2016
commit cbb8e7d4e55236e16d0ee1f8d93cdc9e34077deb
206 changes: 148 additions & 58 deletions doc/api/axis_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@
:local:
:backlinks: entry


.. automodule:: matplotlib.axis

Inheritance
===========

.. inheritance-diagram:: Tick Ticker XAxis YAxis XTick YTick
:private-bases:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for not having the inheritance diagram always at the top (preferable to me) or always at the bottom.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I thought it went better at the top in Artist and better at the bottom here. The reason for that is that I would expect users to frequently directly use the Axis classes, but not the Tick classes, hence I put the diagram at the bottom. Having now written out this justification, that makes me think that Axis and Tick should get their own pages.

Copy link
Member Author

@tacaswell tacaswell Sep 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I now see this is really at the top so I am not sure what I was remembering...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be moved to the bottom for all figures.
Opening a bug #7190.



``Axis`` objects
================
Expand All @@ -20,77 +25,139 @@
.. autoclass:: Ticker


Methods
-------
.. autosummary::
:toctree: _as_gen
:nosignatures:

Axis
~~~~
Axis.cla
Axis.get_scale


Formatters and Locators
-----------------------

.. autosummary::
:toctree: _as_gen
:nosignatures:

Axis.get_major_formatter
Axis.get_major_locator
Axis.get_minor_formatter
Axis.get_minor_locator
Axis.set_major_formatter
Axis.set_major_locator
Axis.set_minor_formatter
Axis.set_minor_locator

Axis.OFFSETTEXTPAD
Axis.axis_date
Axis.cla
Axis.convert_units
Axis.get_data_interval
Axis.get_gridlines

Axis Label
----------

.. autosummary::
:toctree: _as_gen
:nosignatures:

Axis.set_label_coords
Axis.set_label_position
Axis.set_label_text
Axis.get_label_position
Axis.get_label_text
Axis.get_major_formatter
Axis.get_major_locator

Ticks, tick labels and Offset text
----------------------------------

.. autosummary::
:toctree: _as_gen
:nosignatures:

Axis.get_major_ticks
Axis.get_majorticklabels
Axis.get_majorticklines
Axis.get_majorticklocs
Axis.get_minor_formatter
Axis.get_minor_locator
Axis.get_minor_ticks
Axis.get_minorticklabels
Axis.get_minorticklines
Axis.get_minorticklocs
Axis.get_minpos

Axis.get_offset_text
Axis.get_pickradius
Axis.get_scale
Axis.get_smart_bounds

Axis.get_tick_padding
Axis.get_tick_space
Axis.get_ticklabel_extents
Axis.get_ticklabels
Axis.get_ticklines
Axis.get_ticklocs
Axis.get_tightbbox
Axis.get_units
Axis.get_view_interval

Axis.get_gridlines
Axis.grid

Axis.iter_ticks
Axis.limit_range_for_scale
Axis.pan
Axis.reset_ticks
Axis.set_tick_params

Axis.axis_date


Data and view internvals
------------------------

.. autosummary::
:toctree: _as_gen
:nosignatures:

Axis.get_data_interval
Axis.get_view_interval
Axis.set_data_interval
Axis.set_default_intervals
Axis.set_label_coords
Axis.set_label_position
Axis.set_label_text
Axis.set_major_formatter
Axis.set_major_locator
Axis.set_minor_formatter
Axis.set_minor_locator
Axis.set_view_interval

Rendering helpers
-----------------

.. autosummary::
:toctree: _as_gen
:nosignatures:

Axis.get_minpos
Axis.get_tick_space
Axis.get_ticklabel_extents
Axis.get_tightbbox


Interactive
-----------

.. autosummary::
:toctree: _as_gen
:nosignatures:


Axis.get_pickradius
Axis.set_pickradius
Axis.set_smart_bounds
Axis.set_tick_params
Axis.set_ticklabels
Axis.set_ticks


Units
-----

.. autosummary::
:toctree: _as_gen
:nosignatures:

Axis.convert_units
Axis.set_units
Axis.set_view_interval
Axis.get_units
Axis.update_units


Incremental navigation
----------------------

.. autosummary::
:toctree: _as_gen
:nosignatures:

Axis.pan
Axis.zoom

YAxis
~~~~~

YAxis Specific
--------------

.. autosummary::
:toctree: _as_gen
Expand All @@ -104,8 +171,9 @@ YAxis
YAxis.tick_left
YAxis.tick_right

XAxis
~~~~~

XAxis Specific
--------------
.. autosummary::
:toctree: _as_gen
:nosignatures:
Expand All @@ -118,6 +186,38 @@ XAxis
XAxis.tick_top


Other
-----

.. autosummary::
:toctree: _as_gen
:nosignatures:


Axis.OFFSETTEXTPAD

Axis.limit_range_for_scale
Axis.reset_ticks
Axis.set_default_intervals
Axis.get_smart_bounds
Axis.set_smart_bounds

Discouraged
-----------

These methods implicitly use `~matplotlib.ticker.FixedLocator` and
`~matplotlib.ticker.FixedFormatter`. They can be convenient, but if
not used together may de-couple your tick labels from your data.

.. autosummary::
:toctree: _as_gen
:nosignatures:

Axis.set_ticklabels
Axis.set_ticks



``Tick`` objects
================

Expand All @@ -126,9 +226,6 @@ XAxis
.. autoclass:: YTick


Methods
-------

.. autosummary::
:toctree: _as_gen
:nosignatures:
Expand All @@ -147,18 +244,11 @@ Methods
Tick.update_position



Inheritance
===========

.. inheritance-diagram:: Tick Ticker XAxis YAxis XTick YTick
:private-bases:

Common and inherited methods
============================

XTick
-----
``XTick``
---------

.. autosummary::
:toctree: _as_gen
Expand Down Expand Up @@ -265,8 +355,8 @@ YAxis
YAxis.update_units
YAxis.zoom

YAxis
-----
``YAxis``
---------

.. autosummary::
:toctree: _as_gen
Expand Down