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: change marginal scatter plot to subplot_mosaic#29670

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

Conversation

jklymak
Copy link
Member

Follow up to#29667 to use subplot_mosaic instead ofadd_gridspec and threeadd_subplot calls.

I actually removed the gridspec example, though happy to revert and put at the end. I don't think users in general should ever need to use gridspec.

@github-actionsgithub-actionsbot added the Documentation: examplesfiles in galleries/examples labelFeb 23, 2025
@jklymakjklymakforce-pushed thedoc-marginal-subplot-mosaic branch from2c2741d to99c31daCompareFebruary 24, 2025 01:31
Copy link
Member

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

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

Additional note: The examples seems to be more about subplots and placements rather than lines bars and markers. I propose to move this to the "Subplots, Axes and figures" section. Here or in a followup PR.

rcomer reacted with thumbs up emoji
@jklymak
Copy link
MemberAuthor

"Subplots, Axes and figures" section. Here or in a followup PR.

For sure could do that - I think the original motivation was to show folks how to make this relatively common plot type, so having it here lets them see that its possible, though of course the only "hard" thing about it is the axes layout. I could see the case for going in either direction.

@jklymakjklymakforce-pushed thedoc-marginal-subplot-mosaic branch from99c31da to7fc37beCompareFebruary 24, 2025 16:27
@jklymakjklymakforce-pushed thedoc-marginal-subplot-mosaic branch fromd6cfc3f to789f3a5CompareFebruary 25, 2025 14:59
@jklymakjklymakforce-pushed thedoc-marginal-subplot-mosaic branch fromd64a582 to792c28aCompareFebruary 25, 2025 15:49
@@ -109,12 +102,24 @@ def scatter_hist(x, y, ax, ax_histx, ax_histy):

# %%
#
# While we recommend using one of the two methods described above, there are
# number of other ways to achieve a similar layout:
# - The Axes can be positioned manually in relative coordinates using
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 Axes can be positioned manually in relative coordinates using
#
# - The Axes can be positioned manually in relative coordinates using

Sorry, overlooked one additional ReST formatting issue (bullet lists must be separated with an empty line)

jklymak reacted with thumbs up emoji
# .. admonition:: References
#
# The use of the following functions, methods, classes and modules is shown
# in this example:
#
# - `matplotlib.figure.Figure.add_subplot`
# - `matplotlib.figure.Figure.subplot_mosaic`
# - `matplotlib.figure.Figure.add_gridspec`
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
# - `matplotlib.figure.Figure.add_gridspec`

No longer used in the example.

jklymak reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

replaced withadd_subplot also addedpyplot.subplot_mosaic because that is more relevant.

#    - `matplotlib.figure.Figure.subplot_mosaic`#    - `matplotlib.pyplot.subplot_mosaic`#    - `matplotlib.figure.Figure.add_subplot`#    - `matplotlib.axes.Axes.inset_axes`#    - `matplotlib.axes.Axes.scatter`#    - `matplotlib.axes.Axes.hist`

Comment on lines 18 to 19
While `.Axes.inset_axes` may be a bit more complex, it allows correct handling
of main Axes with a fixed aspect ratio.
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
While`.Axes.inset_axes`maybeabitmorecomplex,itallowscorrecthandling
ofmainAxeswithafixedaspectratio.

Optional, but could be left out. That is also explained at the start of the inset_axes example itself.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I guess I think it is also useful to explain why there are two methods where they are listed. A bit of repetition is probably OK.

@timhoffmtimhoffm added this to thev3.10.0-doc milestoneFeb 26, 2025
@timhoffmtimhoffm merged commit0b7a88a intomatplotlib:mainFeb 26, 2025
22 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestFeb 26, 2025
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestFeb 26, 2025
timhoffm added a commit that referenced this pull requestFeb 27, 2025
…670-on-v3.10.xBackport PR#29670 on branch v3.10.x (DOC: change marginal scatter plot to subplot_mosaic)
timhoffm added a commit that referenced this pull requestFeb 27, 2025
…670-on-v3.10.0-docBackport PR#29670 on branch v3.10.0-doc (DOC: change marginal scatter plot to subplot_mosaic)
@jklymak
Copy link
MemberAuthor

Thanks for the help@timhoffm

timhoffm reacted with thumbs up emoji

@jklymakjklymak deleted the doc-marginal-subplot-mosaic branchFebruary 27, 2025 01:23
@ksundenksunden mentioned this pull requestMar 3, 2025
5 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Labels
Documentation: examplesfiles in galleries/examples
Projects
None yet
Milestone
v3.10-doc
Development

Successfully merging this pull request may close these issues.

2 participants
@jklymak@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp