8000 DOC: re-wording based on reviews · meeseeksmachine/matplotlib@c9af555 · GitHub
[go: up one dir, main page]

Skip to content

Commit c9af555

Browse files
committed
DOC: re-wording based on reviews
1 parent d4b9f49 commit c9af555

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

tutorials/advanced/transforms_tutorial.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@
1313
available to you, or create your own (see :mod:`matplotlib.transforms`). The
1414
table below summarizes some useful coordinate systems, a description of
1515
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,
1717
``ax`` is a :class:`~matplotlib.axes.Axes` instance, and ``fig`` is a
1818
:class:`~matplotlib.figure.Figure` instance.
1919
2020
+----------------+-----------------------------------+-----------------------------+
2121
|Coordinate |Description |Transformation object |
2222
|system | |from system to display |
2323
+================+===================================+=============================+
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. | |
2626
+----------------+-----------------------------------+-----------------------------+
2727
|"axes" |The coordinate system of the |``ax.transAxes`` |
2828
| |`~matplotlib.axes.Axes`; (0, 0) | |
@@ -71,16 +71,20 @@
7171
destination coordinate systems, however the objects referred to in the table
7272
above are constructed to take inputs in their coordinate system, and transform
7373
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
7575
already is in *display* coordinates. The naming and destination conventions
7676
are an aid to keeping track of the available "standard" coordinate systems and
7777
transforms.
7878
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.
8488
8589
Note that specifying the position of Artists in *display* coordinates may
8690
change their relative location if the ``dpi`` or size of the figure changes.

0 commit comments

Comments
 (0)
0