Skip to content

Reorganise mpl_toolkits documentation #5752

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 32 commits into from
Jan 8, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
999786f
Move axesgrid1 api docs to axesgrid1
jenshnielsen Dec 26, 2015
8f461a2
Move non bundled packages from toolkits to resources
jenshnielsen Dec 26, 2015
b72e97a
Split documentation in axisartist and axes_grid1
jenshnielsen Dec 26, 2015
786c389
Move axisartist userguide to axisartist
jenshnielsen Dec 26, 2015
e9a9cc8
Remove warning
jenshnielsen Dec 26, 2015
a8ae5aa
Split axes_grid1 and axisartist examples
jenshnielsen Dec 26, 2015
60a8b7f
Correct links to examples
jenshnielsen Dec 26, 2015
535eb24
Correct links in whatsnew
jenshnielsen Dec 26, 2015
d49bbce
Correct links to gallery
jenshnielsen Dec 26, 2015
047ccb2
Split figures in axisartist and axisgrid1
jenshnielsen Dec 26, 2015
b1798b6
Correct links to figures
jenshnielsen Dec 26, 2015
138a6c1
Move axisartist docs
jenshnielsen Dec 26, 2015
ef84b93
Move overview docs up one level
jenshnielsen Dec 26, 2015
b41caa4
Clarify index
jenshnielsen Dec 28, 2015
44fb5ea
Update axes_grid1 overview
jenshnielsen Dec 29, 2015
9862d43
Update axes_grid1 some more
jenshnielsen Dec 29, 2015
a2d8009
update axisartist
jenshnielsen Dec 29, 2015
69705a7
Copy all remaing functionality from axes_grid to axisartist
jenshnielsen Dec 29, 2015
b17e5d6
Deprecate mpl_toolkits.axes_grid
jenshnielsen Dec 29, 2015
74da787
Move third party packages to its own toplevel index
jenshnielsen Dec 29, 2015
f6a4c78
Correct module name for axisartist
jenshnielsen Dec 29, 2015
3446e2c
Correct links on front page
jenshnielsen Dec 29, 2015
dd8a782
Update examples readme
jenshnielsen Dec 29, 2015
0635dfe
Remove the use of axes_grid from plotting userguide
jenshnielsen Dec 29, 2015
3b52513
remove pre python26 workaround
jenshnielsen Dec 29, 2015
5846f77
axes_grid to axes_grid1 in whatsnew
jenshnielsen Dec 29, 2015
6e805cf
Don't mention axes_grid in the annotation guide
jenshnielsen Dec 29, 2015
969982e
Remove toc trees
jenshnielsen Dec 30, 2015
00cdd55
Add note about the Matplotlib github org
jenshnielsen Dec 30, 2015
e47e071
Correct typos found by mdboom
jenshnielsen Dec 30, 2015
e817d39
Add api changes about deprecating axes_grid
jenshnielsen Dec 30, 2015
301980c
Correct typos found by @WeatherGod
jenshnielsen Jan 5, 2016
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
Split documentation in axisartist and axes_grid1
  • Loading branch information
jenshnielsen committed Jan 5, 2016
commit b72e97a9f38f729a19c193bbf96a251f6002363d
2 changes: 1 addition & 1 deletion doc/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def all():

required_symlinks = [
('mpl_examples', '../examples/'),
('mpl_toolkits/axes_grid/examples', '../../../examples/axes_grid/')
('mpl_toolkits/axes_grid1/examples', '../../../examples/axes_grid/')
]

symlink_warnings = []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
.. _axes_grid-api-index:

#######################################
The Matplotlib AxesGrid Toolkit API
#######################################

:Release: |version|
:Date: |today|

.. toctree::

axis_artist_api.rst

.. _axes_grid1-api-index:

#######################################
The Matplotlib axes_grid1 Toolkit API
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

.. _toolkit_axesgrid-index:
.. _toolkit_axesgrid1-index:

Matplotlib AxesGrid Toolkit
===========================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ AxesDivider
The axes_divider module provide helper classes to adjust the axes
positions of set of images in the drawing time.

* :mod:`~mpl_toolkits.axes_grid.axes_size` provides a classes of
* :mod:`~mpl_toolkits.axes_grid1.axes_size` provides a classes of
units that the size of each axes will be determined. For example,
you can specify a fixed size

* :class:`~mpl_toolkits.axes_grid.axes_size.Divider` this is the class
* :class:`~mpl_toolkits.axes_grid1.axes_size.Divider` this is the class
that is used calculates the axes position. It divides the given
rectangular area into several areas. You initialize the divider by
setting the horizontal and vertical list of sizes that the division
Expand All @@ -29,7 +29,7 @@ for example,::

where, rect is a bounds of the box that will be divided and h0,..h3,
v0,..v2 need to be an instance of classes in the
:mod:`~mpl_toolkits.axes_grid.axes_size`. They have *get_size* method
:mod:`~mpl_toolkits.axes_grid1.axes_size`. They have *get_size* method
that returns a tuple of two floats. The first float is the relative
size, and the second float is the absolute size. Consider a following
grid.
Expand All @@ -56,11 +56,11 @@ determined. When aspect ratio is set, the total height (or width) will
be adjusted accordingly.


The :mod:`mpl_toolkits.axes_grid.axes_size` contains several classes
The :mod:`mpl_toolkits.axes_grid1.axes_size` contains several classes
that can be used to set the horizontal and vertical configurations. For
example, for the vertical configuration above will be::

from mpl_toolkits.axes_grid.axes_size import Fixed, Scaled
from mpl_toolkits.axes_grid1.axes_size import Fixed, Scaled
vert = [Fixed(2), Scaled(2), Scaled(3)]

After you set up the divider object, then you create a locator
Expand All @@ -82,12 +82,11 @@ may consider it as [0:2, 1].

See the example,

.. plot:: mpl_toolkits/axes_grid/figures/simple_axes_divider2.py
.. plot:: mpl_toolkits/axes_grid1/figures/simple_axes_divider2.py
:include-source:

You can adjust the size of the each axes according to their x or y
data limits (AxesX and AxesY), similar to the axes aspect parameter.

.. plot:: mpl_toolkits/axes_grid/figures/simple_axes_divider3.py
.. plot:: mpl_toolkits/axes_grid1/figures/simple_axes_divider3.py
:include-source:

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ In summary, all these changes was to support
* a curvilinear grid.
* a floating axis

.. plot:: mpl_toolkits/axes_grid/examples/demo_floating_axis.py
.. plot:: mpl_toolkits/axes_grid1/examples/demo_floating_axis.py


*mpl_toolkits.axisartist.Axes* class defines a *axis* attribute, which
Expand Down Expand Up @@ -195,7 +195,7 @@ using "set_axis_direction" method. ::
ax1.axis["left"].major_ticklabels.set_axis_direction("top")
ax1.axis["right"].label.set_axis_direction("left")

.. plot:: mpl_toolkits/axes_grid/figures/simple_axis_direction01.py
.. plot:: mpl_toolkits/axes_grid1/figures/simple_axis_direction01.py

The parameter for set_axis_direction is one of ["left", "right",
"bottom", "top"].
Expand All @@ -206,27 +206,27 @@ You must understand some underlying concept of directions.
of the axis line with increasing coordinate. For example, the
reference direction of the left x-axis is from bottom to top.

.. plot:: mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.py
.. plot:: mpl_toolkits/axes_grid1/figures/axis_direction_demo_step01.py

The direction, text angle, and alignments of the ticks, ticklabels and
axis-label is determined with respect to the reference direction

2. *ticklabel_direction* is either the right-hand side (+) of the
reference direction or the left-hand side (-).

.. plot:: mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.py
.. plot:: mpl_toolkits/axes_grid1/figures/axis_direction_demo_step02.py

3. same for the *label_direction*

.. plot:: mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.py
.. plot:: mpl_toolkits/axes_grid1/figures/axis_direction_demo_step03.py

4. ticks are by default drawn toward the opposite direction of the ticklabels.

5. text rotation of ticklabels and label is determined in reference
to the *ticklabel_direction* or *label_direction*,
respectively. The rotation of ticklabels and label is anchored.

.. plot:: mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.py
.. plot:: mpl_toolkits/axes_grid1/figures/axis_direction_demo_step04.py


On the other hand, there is a concept of "axis_direction". This is a
Expand All @@ -251,7 +251,7 @@ And, 'set_axis_direction("top")' means to adjust the text rotation
etc, for settings suitable for "top" axis. The concept of axis
direction can be more clear with curved axis.

.. plot:: mpl_toolkits/axes_grid/figures/demo_axis_direction.py
.. plot:: mpl_toolkits/axes_grid1/figures/demo_axis_direction.py

The axis_direction can be adjusted in the AxisArtist level, or in the
level of its child arists, i.e., ticks, ticklabels, and axis-label. ::
Expand Down Expand Up @@ -281,7 +281,7 @@ default direction). ::

ax.axis[:].major_ticks.set_tick_out(True)

.. plot:: mpl_toolkits/axes_grid/figures/simple_axis_direction03.py
.. plot:: mpl_toolkits/axes_grid1/figures/simple_axis_direction03.py


So, in summary,
Expand Down Expand Up @@ -310,7 +310,7 @@ Adjusting ticklabels alignment

Alignment of TickLabels are treated specially. See below

.. plot:: mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.py
.. plot:: mpl_toolkits/axes_grid1/figures/demo_ticklabel_alignment.py

Adjusting pad
--------------
Expand All @@ -324,7 +324,7 @@ Or ticklabels and axis-label ::
ax.axis["left"].label.set_pad(10)


.. plot:: mpl_toolkits/axes_grid/figures/simple_axis_pad.py
.. plot:: mpl_toolkits/axes_grid1/figures/simple_axis_pad.py


GridHelper
Expand Down Expand Up @@ -418,7 +418,7 @@ coordinates, or you may use Parasite Axes for convenience.::
ax1.parasites.append(ax2)


.. plot:: mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.py
.. plot:: mpl_toolkits/axes_grid1/examples/demo_curvelinear_grid.py



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ to draw ticks, ticklines and etc., Axes in axisartist uses special
artist (AxisArtist) which can handle tick, ticklines and etc. for
curved coordinate systems.

.. plot:: mpl_toolkits/axes_grid/examples/demo_floating_axis.py
.. plot:: mpl_toolkits/axes_grid1/examples/demo_floating_axis.py

Since it uses a special artists, some mpl commands that work on
Axes.xaxis and Axes.yaxis may not work. See LINK for more detail.
Expand All @@ -56,7 +56,7 @@ data (e.g., different y-scale) in a same Axes. `AnchoredArtists`_
includes custom artists which are placed at some anchored position,
like the legend.

.. plot:: mpl_toolkits/axes_grid/examples/demo_axes_grid.py
.. plot:: mpl_toolkits/axes_grid1/examples/demo_axes_grid.py


AXES_GRID1
Expand All @@ -73,7 +73,7 @@ ratio. For example, displaying images of a same size with some fixed
padding between them cannot be easily done in matplotlib. ImageGrid is
used in such case.

.. plot:: mpl_toolkits/axes_grid/examples/simple_axesgrid.py
.. plot:: mpl_toolkits/axes_grid1/examples/simple_axesgrid.py
:include-source:

* The position of each axes is determined at the drawing time (see
Expand All @@ -87,7 +87,7 @@ used in such case.
height. The widths (height) of the axes in the same row (column) are
scaled according to their view limits (xlim or ylim).

.. plot:: mpl_toolkits/axes_grid/examples/simple_axesgrid2.py
.. plot:: mpl_toolkits/axes_grid1/examples/simple_axesgrid2.py
:include-source:

* xaxis are shared among axes in a same column. Similarly, yaxis are
Expand Down Expand Up @@ -175,7 +175,7 @@ attribute.

The examples below show what you can do with AxesGrid.

.. plot:: mpl_toolkits/axes_grid/examples/demo_axes_grid.py
.. plot:: mpl_toolkits/axes_grid1/examples/demo_axes_grid.py


AxesDivider
Expand Down Expand Up @@ -206,7 +206,7 @@ creates a new axes on the given side of ("top", "right", "bottom" and
colorbar whose height (or width) in sync with the master axes
-------------------------------------------------------------

.. plot:: mpl_toolkits/axes_grid/figures/simple_colorbar.py
.. plot:: mpl_toolkits/axes_grid1/figures/simple_colorbar.py
:include-source:


Expand Down Expand Up @@ -236,7 +236,7 @@ The "scatter_hist.py" example in mpl can be rewritten using

See the full source code below.

.. plot:: mpl_toolkits/axes_grid/examples/scatter_hist.py
.. plot:: mpl_toolkits/axes_grid1/examples/scatter_hist.py


The scatter_hist using the AxesDivider has some advantage over the
Expand Down Expand Up @@ -271,7 +271,7 @@ parasite axes. To create a host axes, you may use *host_suplot* or
Example 1. twinx
~~~~~~~~~~~~~~~~

.. plot:: mpl_toolkits/axes_grid/figures/parasite_simple.py
.. plot:: mpl_toolkits/axes_grid1/figures/parasite_simple.py
:include-source:

Example 2. twin
Expand All @@ -288,7 +288,7 @@ tick-formatter for bottom(or left)-axis. ::
r"$\pi$", r"$\frac{3}{2}\pi$", r"$2\pi$"])


.. plot:: mpl_toolkits/axes_grid/examples/simple_axisline4.py
.. plot:: mpl_toolkits/axes_grid1/examples/simple_axisline4.py



Expand All @@ -297,7 +297,7 @@ x-limit in the host axes, the x-limit of the parasite axes will change
accordingly.


.. plot:: mpl_toolkits/axes_grid/examples/parasite_simple2.py
.. plot:: mpl_toolkits/axes_grid1/examples/parasite_simple2.py


AnchoredArtists
Expand All @@ -310,7 +310,7 @@ limited support for an arbitrary transform. For example, the ellipse
in the example below will have width and height in the data
coordinate.

.. plot:: mpl_toolkits/axes_grid/examples/simple_anchored_artists.py
.. plot:: mpl_toolkits/axes_grid1/examples/simple_anchored_artists.py
:include-source:


Expand Down Expand Up @@ -344,15 +344,15 @@ some factor. For example, ::
creates an inset axes whose data scale is half of the parent axes.
Here is complete examples.

.. plot:: mpl_toolkits/axes_grid/examples/inset_locator_demo.py
.. plot:: mpl_toolkits/axes_grid1/examples/inset_locator_demo.py

For example, :func:`zoomed_inset_axes` can be used when you want the
inset represents the zoom-up of the small portion in the parent axes.
And :mod:`~mpl_toolkits/axes_grid/inset_locator` provides a helper
function :func:`mark_inset` to mark the location of the area
represented by the inset axes.

.. plot:: mpl_toolkits/axes_grid/examples/inset_locator_demo2.py
.. plot:: mpl_toolkits/axes_grid1/examples/inset_locator_demo2.py
:include-source:


Expand All @@ -374,7 +374,7 @@ yaxis of each axes are shared. ::
origin="lower", interpolation="nearest")


.. plot:: mpl_toolkits/axes_grid/figures/simple_rgb.py
.. plot:: mpl_toolkits/axes_grid1/figures/simple_rgb.py


AXISARTIST
Expand Down Expand Up @@ -418,15 +418,15 @@ For example, you can hide the right, and top axis by ::
ax.axis["top"].set_visible(False)


.. plot:: mpl_toolkits/axes_grid/figures/simple_axisline3.py
.. plot:: mpl_toolkits/axes_grid1/figures/simple_axisline3.py


It is also possible to add an extra axis. For example, you may have an
horizontal axis at y=0 (in data coordinate). ::

ax.axis["y=0"] = ax.new_floating_axis(nth_coord=0, value=0)

.. plot:: mpl_toolkits/axes_grid/figures/simple_axisartist1.py
.. plot:: mpl_toolkits/axes_grid1/figures/simple_axisartist1.py
:include-source:


Expand Down Expand Up @@ -454,7 +454,7 @@ to create a host subplot with axisartist.Axes, ::
Here is an example that uses parasiteAxes.


.. plot:: mpl_toolkits/axes_grid/examples/demo_parasite_axes2.py
.. plot:: mpl_toolkits/axes_grid1/examples/demo_parasite_axes2.py



Expand All @@ -464,7 +464,7 @@ Curvilinear Grid
The motivation behind the AxisArtist module is to support curvilinear grid
and ticks.

.. plot:: mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.py
.. plot:: mpl_toolkits/axes_grid1/examples/demo_curvelinear_grid.py

See :ref:`axisartist-manual` for more details.

Expand All @@ -475,6 +475,4 @@ Floating Axes
This also support a Floating Axes whose outer axis are defined as
floating axis.

.. plot:: mpl_toolkits/axes_grid/examples/demo_floating_axes.py


.. plot:: mpl_toolkits/axes_grid1/examples/demo_floating_axes.py
12 changes: 12 additions & 0 deletions doc/mpl_toolkits/axisartist/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. _axisartist-api-index:

#######################################
The Matplotlib Axisartist Toolkit API
#######################################

:Release: |version|
:Date: |today|

.. toctree::

axis_artist_api.rst
8 changes: 8 additions & 0 deletions doc/mpl_toolkits/axisartist/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. _toolkit_axisartist-index:

Matplotlib Axisartist Toolkit
=============================

.. toctree::

api/index.rst
Loading