Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Doc tweak transform tutorial #22702

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 5 commits into from
Apr 9, 2022

Conversation

tacaswell
Copy link
Member

PR Summary

I tried to clarify some of the transform tutorial prose based on #22688 (comment)

PR Checklist

Documentation

  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

- Extended the headers
- moved "display" to the bottom
- add notes about "display" coordinates being backend dependent
Try to make it more clear that the transforms are naive-to-coordinates
functions and the naming conventions / always go to display convention is to
aid understanding but not inherent to the code.
@tacaswell tacaswell added this to the v3.6.0 milestone Mar 25, 2022
Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks helpful to me, plus or minus a couple of typos/suggestions.

Comment on lines 24 to 26
|"data" |The coordinate system for the data,|``ax.transData`` |
| |controlled by xlim and ylim. | |
+----------------+-----------------------------------+-----------------------------+
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
|"data" |The coordinate system for the data,|``ax.transData`` |
| |controlled by xlim and ylim. | |
+----------------+-----------------------------------+-----------------------------+
|"data" |The axes coordinate system for the data,|``ax.transData`` |
| |controlled by xlim and ylim. | |
+----------------+-----------------------------------+-----------------------------+

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say 'The coordinate system for the data in an Axes'

Comment on lines 79 to 80
The transformations also know how to invert themselves, to go from *display*
back to the native coordinate system. This is particularly useful when
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The transformations also know how to invert themselves, to go from *display*
back to the native coordinate system. This is particularly useful when
The transformations also know how to invert themselves, to go from *display*
back to the transform's coordinate system. This is particularly useful when

not sure this is right, but "native" isn't fully clear here...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

back to the input coordinate system?

Comment on lines 24 to 26
|"data" |The coordinate system for the data,|``ax.transData`` |
| |controlled by xlim and ylim. | |
+----------------+-----------------------------------+-----------------------------+
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say 'The coordinate system for the data in an Axes'

available to you, or create your own (see :mod:`matplotlib.transforms`). The
table below summarizes the some useful coordinate systems, the description of
that system, and the transformation object for going from that coordinate
system to the *display* coordinates. In the ``Transformation Object`` column,
``ax`` is a :class:`~matplotlib.axes.Axes` instance, and ``fig`` is a
:class:`~matplotlib.figure.Figure` instance.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We missed defining subfigure before.

Comment on lines 79 to 80
The transformations also know how to invert themselves, to go from *display*
back to the native coordinate system. This is particularly useful when
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

back to the input coordinate system?

@jklymak jklymak marked this pull request as draft April 8, 2022 09:12
@jklymak
Copy link
Member

jklymak commented Apr 8, 2022

Moved to draft for now

tacaswell and others added 2 commits April 8, 2022 12:11
Co-authored-by: Elliott Sales de Andrade <[email protected]>
Co-authored-by: Jody Klymak <[email protected]>
@tacaswell tacaswell marked this pull request as ready for review April 8, 2022 16:23
@tacaswell
Copy link
Member Author

Directly took about half of the coments and tried to address the rest.

@jklymak
Copy link
Member

jklymak commented Apr 9, 2022

Lets merge as an improvement. If there are further suggestions, they can come in a new PR

@jklymak jklymak merged commit 28cebd4 into matplotlib:main Apr 9, 2022
@tacaswell tacaswell deleted the doc_tweak_transform_tutorial branch April 9, 2022 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants