|
13 | 13 | available to you, or create your own (see :mod:`matplotlib.transforms`). The
|
14 | 14 | table below summarizes some useful coordinate systems, a description of
|
15 | 15 | each system, and the transformation object for going from each coordinate
|
16 |
| -system to the *display* coordinates. In the ``Transformation Object`` column, |
| 16 | +system to the *display* coordinates. In the "Transformation Object" column, |
17 | 17 | ``ax`` is a :class:`~matplotlib.axes.Axes` instance, and ``fig`` is a
|
18 | 18 | :class:`~matplotlib.figure.Figure` instance.
|
19 | 19 |
|
20 | 20 | +----------------+-----------------------------------+-----------------------------+
|
21 | 21 | |Coordinate |Description |Transformation object |
|
22 | 22 | |system | |from system to display |
|
23 | 23 | +================+===================================+=============================+
|
24 |
| -|"data" |The coordinate system for the data,|``ax.transData`` | |
25 |
| -| |controlled by xlim and ylim. | | |
| 24 | +|"data" |The coordinate system of the data |``ax.transData`` | |
| 25 | +| |in the Axes. | | |
26 | 26 | +----------------+-----------------------------------+-----------------------------+
|
27 | 27 | |"axes" |The coordinate system of the |``ax.transAxes`` |
|
28 | 28 | | |`~matplotlib.axes.Axes`; (0, 0) | |
|
|
71 | 71 | destination coordinate systems, however the objects referred to in the table
|
72 | 72 | above are constructed to take inputs in their coordinate system, and transform
|
73 | 73 | the input to the *display* coordinate system. That is why the *display*
|
74 |
| -coordinate system has ``None`` for the ``Transformation Object`` column -- it |
| 74 | +coordinate system has `None` for the "Transformation Object" column -- it |
75 | 75 | already is in *display* coordinates. The naming and destination conventions
|
76 | 76 | are an aid to keeping track of the available "standard" coordinate systems and
|
77 | 77 | transforms.
|
78 | 78 |
|
79 |
| -The transformations also know how to invert themselves, to go from *display* |
80 |
| -back to the native coordinate system. This is particularly useful when |
81 |
| -processing events from the user interface, which typically occur in display |
82 |
| -space, and you want to know where the mouse click or key-press occurred in your |
83 |
| -*data* coordinate system. |
| 79 | +The transformations also know how to invert themselves (via |
| 80 | +`Transform.inverted`) to generate a transform from output coordinate system |
| 81 | +back to the input coordinate system. For example, ``ax.transData`` converts |
| 82 | +values in data coordinates to display coordinates and |
| 83 | +``ax.transData.inversed()`` is a :class:``matplotlib.transforms.Transform` that |
| 84 | +goes from display coordinates to data coordinates. This is particularly useful |
| 85 | +when processing events from the user interface, which typically occur in |
| 86 | +display space, and you want to know where the mouse click or key-press occurred |
| 87 | +in your *data* coordinate system. |
84 | 88 |
|
85 | 89 | Note that specifying the position of Artists in *display* coordinates may
|
86 | 90 | change their relative location if the ``dpi`` or size of the figure changes.
|
|
0 commit comments