Skip to content

DOC: add example of labelling axes - #20147

Merged
QuLogic merged 2 commits into
matplotlib:masterfrom
jklymak:doc-another-transform-example
May 7, 2021
Merged

QuLogic merged 2 commits into
matplotlib:masterfrom
jklymak:doc-another-transform-example

Conversation

@jklymak

@jklymak jklymak commented May 4, 2021

Copy link
Copy Markdown
Member

PR Summary

This new example demos a few approaches to adding labels to subplots, since this is a frequent request.

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@jklymak jklymak modified the milestones: v3.5.0, v3.4-doc May 4, 2021
@jklymak
jklymak force-pushed the doc-another-transform-example branch from f2c1ef1 to 85d1371 Compare May 4, 2021 00:14
# 10 points in and 5 points down:
trans = mtransforms.ScaledTranslation(10/72, -5/72, fig.dpi_scale_trans)
ax.text(0.0, 1.0, label, transform=ax.transAxes + trans,
fontsize='medium', va='top', fontfamily='serif',

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 think you should call out the alignment specifically in the description, too.

Suggested change
fontsize='medium', va='top', fontfamily='serif',
fontsize='medium', verticalalignment='top', fontfamily='serif',

@jklymak
jklymak force-pushed the doc-another-transform-example branch from 13eb3ef to 1fd0822 Compare May 5, 2021 14:09
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
@timhoffm

timhoffm commented May 7, 2021

Copy link
Copy Markdown
Member

I did notbhqve time to look into the details, but #15771 is a related PR that has stalled.

@QuLogic

QuLogic commented May 7, 2021

Copy link
Copy Markdown
Member

We can update this example when that PR is done.

@QuLogic
QuLogic merged commit 876415d into matplotlib:master May 7, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request May 7, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request May 7, 2021
@jklymak
jklymak deleted the doc-another-transform-example branch May 7, 2021 22:54
QuLogic added a commit that referenced this pull request May 7, 2021
…147-on-v3.4.1-doc

Backport PR #20147 on branch v3.4.1-doc (DOC: add example of labelling axes)
jklymak added a commit that referenced this pull request May 8, 2021
…147-on-v3.4.x

Backport PR #20147 on branch v3.4.x (DOC: add example of labelling axes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants