Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

DOC: Improve module docs of matplotlib.scale#29353

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timhoffm merged 1 commit intomatplotlib:mainfromtimhoffm:doc-scales
Dec 21, 2024

Conversation

timhoffm
Copy link
Member

No description provided.

@timhoffmtimhoffm added the Documentation: APIfiles in lib/ and doc/api labelDec 20, 2024
@timhoffmtimhoffmforce-pushed thedoc-scales branch 3 times, most recently from7c82a2a tofe238daCompareDecember 20, 2024 10:40
@timhoffmtimhoffm marked this pull request as ready for reviewDecember 20, 2024 11:26
@timhoffm
Copy link
MemberAuthor

Copy link
Member

@jklymakjklymak left a comment

Choose a reason for hiding this comment

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

Couple of small suggestions you can take or leave.


See also `.axes.Axes.set_xscale` and the scales examples in the documentation.
Scales are subclasses `ScaleBase`. Their mapping is implemented through `.Transform`
Copy link
Member

Choose a reason for hiding this comment

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

This is pretty technical for right at the top? Maybe down around the new L26 would be better?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I've reduced to

The mapping is implemented through.Transform subclasses.

Because that's context needed to understand why the transform columns in the subsequent table exist.

I agree that the technical details are not relevant for users. They are basically only needed when you want to implement your own scales. That information is (although not very concise) available in theScaleBase docstring and theCustom scale example. Therefore we can leave it out of the introductory paragraph. I may later improve the custom scale example. But that's a separate topic.

jklymak reacted with thumbs up emoji

Custom scaling can be achieved through `FuncScale`, or by creating your own
`ScaleBase` subclass (see :doc:`/gallery/scales/custom_scale`).
Third parties can register their scales by name through `register_scale`.

Matplotlib also supports non-separable transformations that operate on both
Copy link
Member

Choose a reason for hiding this comment

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

I find this sentence pretty confusing on its own. Appreciate you are just changing the formatting here, but if we are improving things, we might mention that the previous scales act on one axis at a time, and are for Cartesian axes.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

, and are for Cartesian axes.

This is not quite true, you can e.g set a log radial axis in a polar plot.

I'm tempted to leave out the paragraph. I think that scales and projections are mostly independent of each other (but am not completely sure).

Copy link
Member

Choose a reason for hiding this comment

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

Ok fair enough. Maybe "scales are typically applied individually to the axis of a separable axes. Non-separable axes are dealt with using projections". But maybe you are correct that you could do without it here.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I've removed that paragraph. Irrespective of the exact technical relationship. People looking at scales will typically have a certain projection (mostly cartesian axes) in mind and only consider the scaling behavior along the given axes. It's likely not helpful for them to bring up the topic of other projections here.

@timhoffmtimhoffm added this to thev3.10.1 milestoneDec 21, 2024
@timhoffmtimhoffm merged commit5c3f2f6 intomatplotlib:mainDec 21, 2024
37 of 39 checks passed
@timhoffmtimhoffm deleted the doc-scales branchDecember 21, 2024 23:23
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestDec 21, 2024
timhoffm added a commit that referenced this pull requestDec 22, 2024
…353-on-v3.10.xBackport PR#29353 on branch v3.10.x (DOC: Improve module docs of matplotlib.scale)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jklymakjklymakjklymak approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
v3.10.1
Development

Successfully merging this pull request may close these issues.

2 participants
@timhoffm@jklymak

[8]ページ先頭

©2009-2025 Movatter.jp