Skip to content

Use Axes instead of axes core library code#27105

Merged
dstansby merged 1 commit into
matplotlib:mainfrom
timhoffm:doc-axes-core
Dec 28, 2023
Merged

Use Axes instead of axes core library code#27105
dstansby merged 1 commit into
matplotlib:mainfrom
timhoffm:doc-axes-core

Conversation

@timhoffm

Copy link
Copy Markdown
Member

Part of #18726.

@ksunden ksunden left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mostly seeps pretty good, a couple that I thought were missed (that I could see in the diff view, did not go digging for more)

And wonder if we should give the same treatment to Figure, at least when in close proximity to the Axes that are affected here, as while there is less room for confusion on that one, treating it different to Axes is slightly jarring.


fig, axs = plt.subplots(2, 1)
fig.suptitle('mouse hover over figure or axes to trigger events')
fig.suptitle('mouse hover over figure or Axes to trigger events')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I know the focus was on axes vs Axes, but feels incongruent to leave figure uncapitalized when Axes is capitalized

This was the first place I noticed it (because this was the first line in the diff as rendered on GitHub), but that thought did come up in several other files, notably legend.py and patches.py, and several other places where figures are referred to in the same manner as Axes, but the capitalization is different.

Also this is in galleries, fyi.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Moved to #27104.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Lower case figure: See #18707 (comment) and the response #18707 (comment)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The response is that Figure may be figure without ambiguity, not that it must be figure.

Comment thread galleries/examples/subplots_axes_and_figures/subplots_demo.py Outdated
Comment thread lib/matplotlib/_constrained_layout.py Outdated
Comment thread lib/matplotlib/legend.py
@dstansby dstansby merged commit 7151a98 into matplotlib:main Dec 28, 2023
@timhoffm timhoffm deleted the doc-axes-core branch December 28, 2023 21:34
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.

6 participants