Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 786c389

Browse filesBrowse files
committed
Move axisartist userguide to axisartist
1 parent b72e97a commit 786c389
Copy full SHA for 786c389

File tree

Expand file treeCollapse file tree

5 files changed

+135
-136
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+135
-136
lines changed
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.. _axes_grid_users-guide-index:
1+
.. _axes_grid1_users-guide-index:
22

33
################################################
4-
The Matplotlib AxesGrid Toolkit User's Guide
4+
The Matplotlib AxesGrid1 Toolkit User's Guide
55
################################################
66

77
:Release: |version|
@@ -11,4 +11,3 @@
1111

1212
axes_divider.rst
1313
axisartist.rst
14-

‎doc/mpl_toolkits/axes_grid1/users/overview.rst

Copy file name to clipboardExpand all lines: doc/mpl_toolkits/axes_grid1/users/overview.rst
+8-130Lines changed: 8 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
============================
2-
Overview of AxesGrid toolkit
3-
============================
1+
=============================
2+
Overview of AxesGrid1 toolkit
3+
=============================
44

5-
What is AxesGrid toolkit?
6-
=========================
5+
What is AxesGrid1 toolkit?
6+
==========================
77

8-
The matplotlib AxesGrid toolkit is a collection of helper classes,
8+
The matplotlib AxesGrid1 toolkit is a collection of helper classes,
99
mainly to ease displaying (multiple) images in matplotlib.
1010

1111
.. contents::
@@ -15,32 +15,11 @@ mainly to ease displaying (multiple) images in matplotlib.
1515
.. note::
1616
AxesGrid toolkit has been a part of matplotlib since v
1717
0.99. Originally, the toolkit had a single namespace of
18-
*axes_grid*. In more recent version (since svn r8226), the toolkit
18+
*axes_grid*. In more recent version, the toolkit
1919
has divided into two separate namespace (*axes_grid1* and *axisartist*).
2020
While *axes_grid* namespace is maintained for the backward compatibility,
2121
use of *axes_grid1* and *axisartist* is recommended.
2222

23-
.. warning::
24-
*axes_grid* and *axisartist* (but not *axes_grid1*) uses
25-
a custom Axes class (derived from the mpl's original Axes class).
26-
As a side effect, some commands (mostly tick-related) do not work.
27-
Use *axes_grid1* to avoid this, or see how things are different in
28-
*axes_grid* and *axisartist* (LINK needed)
29-
30-
31-
AxesGrid toolkit has two namespaces (*axes_grid1* and *axisartist*).
32-
*axisartist* contains custom Axes class that is meant to support for
33-
curvilinear grids (e.g., the world coordinate system in astronomy).
34-
Unlike mpl's original Axes class which uses Axes.xaxis and Axes.yaxis
35-
to draw ticks, ticklines and etc., Axes in axisartist uses special
36-
artist (AxisArtist) which can handle tick, ticklines and etc. for
37-
curved coordinate systems.
38-
39-
.. plot:: mpl_toolkits/axes_grid1/examples/demo_floating_axis.py
40-
41-
Since it uses a special artists, some mpl commands that work on
42-
Axes.xaxis and Axes.yaxis may not work. See LINK for more detail.
43-
4423

4524
*axes_grid1* is a collection of helper classes to ease displaying
4625
(multiple) images with matplotlib. In matplotlib, the axes location
@@ -59,7 +38,7 @@ like the legend.
5938
.. plot:: mpl_toolkits/axes_grid1/examples/demo_axes_grid.py
6039

6140

62-
AXES_GRID1
41+
Axes_grid1
6342
==========
6443

6544
ImageGrid
@@ -375,104 +354,3 @@ yaxis of each axes are shared. ::
375354

376355

377356
.. plot:: mpl_toolkits/axes_grid1/figures/simple_rgb.py
378-
379-
380-
AXISARTIST
381-
==========
382-
383-
384-
AxisArtist
385-
----------
386-
387-
AxisArtist module provides a custom (and very experimental) Axes
388-
class, where each axis (left, right, top and bottom) have a separate
389-
artist associated which is responsible to draw axis-line, ticks,
390-
ticklabels, label. Also, you can create your own axis, which can pass
391-
through a fixed position in the axes coordinate, or a fixed position
392-
in the data coordinate (i.e., the axis floats around when viewlimit
393-
changes).
394-
395-
The axes class, by default, have its xaxis and yaxis invisible, and
396-
has 4 additional artists which are responsible to draw axis in
397-
"left","right","bottom" and "top". They are accessed as
398-
ax.axis["left"], ax.axis["right"], and so on, i.e., ax.axis is a
399-
dictionary that contains artists (note that ax.axis is still a
400-
callable methods and it behaves as an original Axes.axis method in
401-
mpl).
402-
403-
To create an axes, ::
404-
405-
import mpl_toolkits.axisartist as AA
406-
fig = plt.figure(1)
407-
ax = AA.Axes(fig, [0.1, 0.1, 0.8, 0.8])
408-
fig.add_axes(ax)
409-
410-
or to create a subplot ::
411-
412-
ax = AA.Subplot(fig, 111)
413-
fig.add_subplot(ax)
414-
415-
For example, you can hide the right, and top axis by ::
416-
417-
ax.axis["right"].set_visible(False)
418-
ax.axis["top"].set_visible(False)
419-
420-
421-
.. plot:: mpl_toolkits/axes_grid1/figures/simple_axisline3.py
422-
423-
424-
It is also possible to add an extra axis. For example, you may have an
425-
horizontal axis at y=0 (in data coordinate). ::
426-
427-
ax.axis["y=0"] = ax.new_floating_axis(nth_coord=0, value=0)
428-
429-
.. plot:: mpl_toolkits/axes_grid1/figures/simple_axisartist1.py
430-
:include-source:
431-
432-
433-
Or a fixed axis with some offset ::
434-
435-
# make new (right-side) yaxis, but wth some offset
436-
ax.axis["right2"] = ax.new_fixed_axis(loc="right",
437-
offset=(20, 0))
438-
439-
440-
441-
AxisArtist with ParasiteAxes
442-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
443-
444-
Most commands in the axes_grid1 toolkit can take a axes_class keyword
445-
argument, and the commands creates an axes of the given class. For example,
446-
to create a host subplot with axisartist.Axes, ::
447-
448-
import mpl_tookits.axisartist as AA
449-
from mpl_toolkits.axes_grid1 import host_subplot
450-
451-
host = host_subplot(111, axes_class=AA.Axes)
452-
453-
454-
Here is an example that uses parasiteAxes.
455-
456-
457-
.. plot:: mpl_toolkits/axes_grid1/examples/demo_parasite_axes2.py
458-
459-
460-
461-
Curvilinear Grid
462-
----------------
463-
464-
The motivation behind the AxisArtist module is to support curvilinear grid
465-
and ticks.
466-
467-
.. plot:: mpl_toolkits/axes_grid1/examples/demo_curvelinear_grid.py
468-
469-
See :ref:`axisartist-manual` for more details.
470-
471-
472-
Floating Axes
473-
-------------
474-
475-
This also support a Floating Axes whose outer axis are defined as
476-
floating axis.
477-
478-
.. plot:: mpl_toolkits/axes_grid1/examples/demo_floating_axes.py

‎doc/mpl_toolkits/axisartist/index.rst

Copy file name to clipboardExpand all lines: doc/mpl_toolkits/axisartist/index.rst
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@ Matplotlib Axisartist Toolkit
44
=============================
55

66
.. toctree::
7+
:maxdepth: 2
78

9+
users/overview.rst
810
api/index.rst
+121Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
==============================
2+
Overview of AxisArtist toolkit
3+
==============================
4+
5+
.. warning::
6+
*axisartist* uses a custom Axes class
7+
(derived from the mpl's original Axes class).
8+
As a side effect, some commands (mostly tick-related) do not work.
9+
10+
11+
*axisartist* contains custom Axes class that is meant to support for
12+
curvilinear grids (e.g., the world coordinate system in astronomy).
13+
Unlike mpl's original Axes class which uses Axes.xaxis and Axes.yaxis
14+
to draw ticks, ticklines and etc., Axes in axisartist uses special
15+
artist (AxisArtist) which can handle tick, ticklines and etc. for
16+
curved coordinate systems.
17+
18+
.. plot:: mpl_toolkits/axes_grid1/examples/demo_floating_axis.py
19+
20+
Since it uses a special artists, some mpl commands that work on
21+
Axes.xaxis and Axes.yaxis may not work.
22+
23+
AXISARTIST
24+
==========
25+
26+
27+
AxisArtist
28+
----------
29+
30+
AxisArtist module provides a custom (and very experimental) Axes
31+
class, where each axis (left, right, top and bottom) have a separate
32+
artist associated which is responsible to draw axis-line, ticks,
33+
ticklabels, label. Also, you can create your own axis, which can pass
34+
through a fixed position in the axes coordinate, or a fixed position
35+
in the data coordinate (i.e., the axis floats around when viewlimit
36+
changes).
37+
38+
The axes class, by default, have its xaxis and yaxis invisible, and
39+
has 4 additional artists which are responsible to draw axis in
40+
"left","right","bottom" and "top". They are accessed as
41+
ax.axis["left"], ax.axis["right"], and so on, i.e., ax.axis is a
42+
dictionary that contains artists (note that ax.axis is still a
43+
callable methods and it behaves as an original Axes.axis method in
44+
mpl).
45+
46+
To create an axes, ::
47+
48+
import mpl_toolkits.axisartist as AA
49+
fig = plt.figure(1)
50+
ax = AA.Axes(fig, [0.1, 0.1, 0.8, 0.8])
51+
fig.add_axes(ax)
52+
53+
or to create a subplot ::
54+
55+
ax = AA.Subplot(fig, 111)
56+
fig.add_subplot(ax)
57+
58+
For example, you can hide the right, and top axis by ::
59+
60+
ax.axis["right"].set_visible(False)
61+
ax.axis["top"].set_visible(False)
62+
63+
64+
.. plot:: mpl_toolkits/axes_grid1/figures/simple_axisline3.py
65+
66+
67+
It is also possible to add an extra axis. For example, you may have an
68+
horizontal axis at y=0 (in data coordinate). ::
69+
70+
ax.axis["y=0"] = ax.new_floating_axis(nth_coord=0, value=0)
71+
72+
.. plot:: mpl_toolkits/axes_grid1/figures/simple_axisartist1.py
73+
:include-source:
74+
75+
76+
Or a fixed axis with some offset ::
77+
78+
# make new (right-side) yaxis, but wth some offset
79+
ax.axis["right2"] = ax.new_fixed_axis(loc="right",
80+
offset=(20, 0))
81+
82+
83+
84+
AxisArtist with ParasiteAxes
85+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
86+
87+
Most commands in the axes_grid1 toolkit can take a axes_class keyword
88+
argument, and the commands creates an axes of the given class. For example,
89+
to create a host subplot with axisartist.Axes, ::
90+
91+
import mpl_tookits.axisartist as AA
92+
from mpl_toolkits.axes_grid1 import host_subplot
93+
94+
host = host_subplot(111, axes_class=AA.Axes)
95+
96+
97+
Here is an example that uses parasiteAxes.
98+
99+
100+
.. plot:: mpl_toolkits/axes_grid1/examples/demo_parasite_axes2.py
101+
102+
103+
104+
Curvilinear Grid
105+
----------------
106+
107+
The motivation behind the AxisArtist module is to support curvilinear grid
108+
and ticks.
109+
110+
.. plot:: mpl_toolkits/axes_grid1/examples/demo_curvelinear_grid.py
111+
112+
See :ref:`axisartist-manual` for more details.
113+
114+
115+
Floating Axes
116+
-------------
117+
118+
This also support a Floating Axes whose outer axis are defined as
119+
floating axis.
120+
121+
.. plot:: mpl_toolkits/axes_grid1/examples/demo_floating_axes.py

‎doc/mpl_toolkits/index.rst

Copy file name to clipboardExpand all lines: doc/mpl_toolkits/index.rst
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ AxesGrid1
4444
axes_grid1/index
4545

4646

47-
The matplotlib :ref:`AxesGrid <toolkit_axesgrid1-index>` toolkit is a collection of helper classes to
48-
ease displaying multiple images in matplotlib. The AxesGrid toolkit is
49-
distributed with matplotlib source.
47+
The matplotlib :ref:`AxesGrid1 <toolkit_axesgrid1-index>` toolkit is a
48+
collection of helper classes to ease displaying multiple images in matplotlib.
5049

5150

5251

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.