Skip to content
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

Annotations tutorial #25532

Merged
merged 3 commits into from Mar 22, 2023
Merged

Annotations tutorial #25532

merged 3 commits into from Mar 22, 2023

Conversation

timhoffm
Copy link
Member

Three stylistic improvements

  • Modify "Annotating an Artist" of Annotations tutorial

to a horizontal arrow so that the arrow line does not cross the
artist. This is somewhat special but visually more pleasing and
possibly a real use case.

old:
grafik

new:
grafik

  • Change coordinates in Annotations tutorial

    ... in the transAxes / "axes fraction" example. Brining the
    annotations closer to the coordinate axes makes it easier to
    see that they are really the same. Also, the previous positioning
    (0.5, 0.5) without centered alignment results in almost, but not
    exactly centering of the text in the Axes frame, which is not
    quite nice visually.

old:
grafik

new:
grafik

  • Modify "Annotating an Artist" of Annotations tutorial

    to a horizontal arrow so that the arrow line does not cross the
    artist. This is somewhat special but visually more pleasing and
    possibly a real use case.

old:
grafik

new:
grafik

Tim Hoffmann added 3 commits March 22, 2023 15:38
to a horizontal arrow so that the arrow line does not cross the
artist. This is somewhat special but visually more pleasing and
possibly a real use case.
... in the `transAxes` / "axes fraction" example. Brining the
annotations closer to the coordinate axes makes it easier to
see that they are really the same. Also, the previous positioning
(0.5, 0.5) without centered alignment results in almost, but not
exactly centering of the text in the Axes frame, which is not
quite nice visually.
Drawing a connection between two related data points seems
a more real-world application than annotating one text with
another text from another Axes.
@timhoffm timhoffm added this to the v3.7-doc milestone Mar 22, 2023
@jklymak jklymak merged commit 73f3a8b into matplotlib:main Mar 22, 2023
34 checks passed
@lumberbot-app
Copy link

lumberbot-app bot commented Mar 22, 2023

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.7.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 73f3a8b59079b7e0cb8690b941b8ea3b8e4cd4fe
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #25532: Annotations tutorial'
  1. Push to a named branch:
git push YOURFORK v3.7.x:auto-backport-of-pr-25532-on-v3.7.x
  1. Create a PR against branch v3.7.x, I would have named this PR:

"Backport PR #25532 on branch v3.7.x (Annotations tutorial)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@lumberbot-app
Copy link

lumberbot-app bot commented Mar 22, 2023

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.7.1-doc
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 73f3a8b59079b7e0cb8690b941b8ea3b8e4cd4fe
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #25532: Annotations tutorial'
  1. Push to a named branch:
git push YOURFORK v3.7.1-doc:auto-backport-of-pr-25532-on-v3.7.1-doc
  1. Create a PR against branch v3.7.1-doc, I would have named this PR:

"Backport PR #25532 on branch v3.7.1-doc (Annotations tutorial)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@jklymak
Copy link
Member

jklymak commented Mar 22, 2023

You can't really backport this in-situ because the tutorials moved. I guess you can decide if you want to backport manually to the old location, but maybe easier to just leave as a 3.8 improvement.

@QuLogic QuLogic modified the milestones: v3.7-doc, v3.8.0 Mar 23, 2023
@timhoffm timhoffm deleted the annotations-tutorial branch March 23, 2023 10:13
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.

None yet

3 participants