@@ -34,7 +34,7 @@ That is why the `display` coordinate system has `None` for the
3434`Transformation Object ` column -- it already is in display
3535coordinates. The transformations also know how to invert themselves,
3636to go from `display ` back to the native coordinate system. This is
37- particularly useful when processing events frmo the user interface,
37+ particularly useful when processing events from the user interface,
3838which typically occur in display space, and you want to know where the
3939mouse click or key-press occurred in your data coordinate system.
4040
@@ -44,8 +44,8 @@ Data coordinates
4444================
4545
4646Let's start with the most commonly used coordinate, the `data `
47- coordinate system. Whenever, you add data to the axes, matplotlib
48- updates the datalimits, most commonly updated in with the
47+ coordinate system. Whenever you add data to the axes, matplotlib
48+ updates the datalimits, most commonly updated with the
4949:meth: `~matplotlib.axes.Axes.set_xlim ` and
5050:meth: `~matplotlib.axes.Axes.set_ylim ` methods. For example, in the
5151figure below, the data limits stretch from 0 to 10 on the x-axis, and
@@ -85,7 +85,7 @@ sequence of points as shown below:
8585 array([[ 335.175, 247. ],
8686 [ 132.435, 642.2 ]])
8787
88- You can use the :meth`~matplotlib.transforms.Transform.inverted`
88+ You can use the :meth: `~matplotlib.transforms.Transform.inverted `
8989method to create a transform which will take you from display to data
9090coordinates:
9191
@@ -152,15 +152,15 @@ Axes coordinates
152152================
153153
154154After the `data ` coordinate system, `axes ` is probably the second most
155- useful coordinate system. Here the point (0,0) is the bottom left
156- of your axes or subplot, (0.5, 0.5) is the center, and (1.0,
157- 1.0) is the top right. You can also refer to points outside the
158- range, so (-0.1, 1 .1) is to the left and above your axes. This
159- coordinate system is extremely useful when making placing text in your
160- axes, because you often want a text bubble in a fixed, location, eg
161- the upper left of the axes pane, and have that location remain fixed
162- when you pan or zoom. Here is a simple example that creates four
163- panels and labels them 'A', 'B', 'C', 'D' as you often see in journals.
155+ useful coordinate system. Here the point (0,0) is the bottom left of
156+ your axes or subplot, (0.5, 0.5) is the center, and (1.0, 1.0) is the
157+ top right. You can also refer to points outside the range, so (-0.1,
158+ 1 .1) is to the left and above your axes. This coordinate system is
159+ extremely useful when placing text in your axes, because you often
160+ want a text bubble in a fixed, location, eg. the upper left of the axes
161+ pane, and have that location remain fixed when you pan or zoom. Here
162+ is a simple example that creates four panels and labels them 'A', 'B',
163+ 'C', 'D' as you often see in journals.
164164
165165.. plot ::
166166 :include-source:
@@ -265,7 +265,7 @@ Using offset transforms to create a shadow effect
265265=================================================
266266
267267One use of transformations is to create a new transformation that is
268- offset from another annotation, eg to place one object shited a bit
268+ offset from another annotation, eg to place one object shifted a bit
269269relative to another object. Typically you want the shift to be in
270270some physical dimension, like points or inches rather than in data
271271coordinates, so that the shift effect is constant at different zoom
@@ -285,20 +285,20 @@ where `xt` and `yt` are the translation offsets, and `scale_trans` is
285285a transformation which scales `xt ` and `yt ` at transformation time
286286before applying the offsets. A typical use case is to use the figure
287287``fig.dpi_scale_trans `` transformation for the `scale_trans ` argument,
288- to first scale `xty and `yt ` specified in points to `display ` space
288+ to first scale `xt ` and `yt ` specified in points to `display ` space
289289before doing the final offset. The dpi and inches offset is a
290290common-enough use case that we have a special helper function to
291291create it in :func: `matplotlib.transforms.offset_copy `, which returns
292292a new transform with an added offset. But in the example below, we'll
293- create the offset trransform ourselves. Note the use of the plus
293+ create the offset transform ourselves. Note the use of the plus
294294operator in::
295295
296296 offset = transforms.ScaledTranslation(dx, dy,
297297 fig.dpi_scale_trans)
298298 shadow_transform = ax.transData + offset
299299
300300showing that can chain transformations using the addition operator.
301- This code say : first appy the data transformation ``ax.transData `` and
301+ This code says : first appy the data transformation ``ax.transData `` and
302302then translate the data by `dx ` and `dy ` points.
303303
304304.. plot ::
@@ -342,12 +342,12 @@ The ``ax.transData`` transform we have been working with in this
342342tutorial is a composite of three different transformations that
343343comprise the transformation pipeline from `data ` -> `display `
344344coordinates. Michael Droettboom implemented the transformations
345- frameowk , taking care to provide a clean API that segregated the
345+ framework , taking care to provide a clean API that segregated the
346346nonlinear projections and scales that happen in polar and logarithmic
347347plots, from the linear affine transformations that happen when you pan
348348and zoom. There is an efficiency here, because you can pan and zoom
349349in your axes which affects the affine transformation, but you may not
350- need to compte the potentially expensice nonlinear scales or
350+ need to compute the potentially expensive nonlinear scales or
351351projections on simple navigation events.
352352
353353
@@ -361,8 +361,8 @@ We've been introduced to the ``transAxes`` instance above in
361361axes or subplot bounding box to `display ` space, so let's look at
362362these other two pieces.
363363
364- ``self.transLimits `` is the transformation that takes your from
365- ``data `` to ``axes `` coordinates; ie , it maps your view xlim and ylim
364+ ``self.transLimits `` is the transformation that takes you from
365+ ``data `` to ``axes `` coordinates; i.e. , it maps your view xlim and ylim
366366to the unit space of the axes (and ``transAxes `` then takes that unit
367367space to display space). We can see this in action here
368368
@@ -397,7 +397,7 @@ and we can use this same inverted transformation to go from the unit
397397 Out[90]: array([ 2.5, -0.5])
398398
399399The final piece is the ``self.transScale `` attribute, which is
400- responsible for the optional non-linear scaling of the data, eg for
400+ responsible for the optional non-linear scaling of the data, eg. for
401401logarithmic axes. When an Axes is initally setup, this is just set to
402402the identity transform, since the basic matplotlib axes has linear
403403scale, but when you call a logarithmic scaling function like
@@ -418,12 +418,13 @@ the typical separable matplotlib Axes, with one additional piece
418418 self.transData = self.transScale + self.transProjection + \
419419 (self.transProjectionAffine + self.transAxes)
420420
421- ``transProjection `` handles the projection from the space, eg latitude and longitude
422- for map data, or radius and theta for polar data, to a separable
423- cartesian coordinate system. There are several projection examples in
424- the ``matplotlib.projections `` package, and the best way to learn more
425- is to open the source for those packages and see how to make your own,
426- since matplotlib supports extensible axes and projections. Michael
427- Droettboom has provided a nice tutorial example of creating a hammer
428- projection axes; see :ref: `api-custom_projection_example `.
421+ ``transProjection `` handles the projection from the space,
422+ eg. latitude and longitude for map data, or radius and theta for polar
423+ data, to a separable cartesian coordinate system. There are several
424+ projection examples in the ``matplotlib.projections `` package, and the
425+ best way to learn more is to open the source for those packages and
426+ see how to make your own, since matplotlib supports extensible axes
427+ and projections. Michael Droettboom has provided a nice tutorial
428+ example of creating a hammer projection axes; see
429+ :ref: `api-custom_projection_example `.
429430
0 commit comments