GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Text rotation patch by Alex-Carter01 · Pull Request #19114 · matplotlib/matplotlib

Conversation

@Alex-Carter01

@Alex-Carter01 Alex-Carter01 commented Dec 14, 2020

Copy link
Copy Markdown

PR Summary

Resolves issue #13044. Fixing calculation error of Y-offset for specific rotation mode of text. This pull also includes a proposed minimal test (based off the original bug report).

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • [N/A] New features are documented, with examples if plot related.
  • [N/A] 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).
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Alex-Carter01 added 3 commits December 14, 2020 17:28
@Alex-Carter01
add comparison image for rotation test in test_text
8a6dc24
@Alex-Carter01
patch to rotation error in anchor, center_baseline mode
7c939d9
fix to error in calculation of Y offset in text rotation.
todo: test and test baseline
@Alex-Carter01
add corresponding test for proposed patch to text rotation
762c32e
see baseline_images for corresponding baseline
@jklymak

jklymak commented Dec 15, 2020

Copy link
Copy Markdown
Member

Thanks a lot for the pull request! Unfortunately this broke some existing tests in test_text.py, so this isn't compatible with the existing behaviour. So you will either have to change the old tests and argue that they were wrong, or modify this....

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jklymak jklymak added status: needs rebase status: needs revision labels Apr 6, 2021
@story645

story645 commented Apr 6, 2021

Copy link
Copy Markdown
Member

hey @Alex-Carter01, do you have any bandwidth to finish up this PR?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@timhoffm timhoffm mentioned this pull request Apr 7, 2021
Center of rotation for text with rotation_mode='anchor' #13044
Closed
@jklymak jklymak added the status: orphaned PR label Apr 23, 2021
@jklymak
jklymak marked this pull request as draft April 23, 2021 16:58
@WeatherGod

WeatherGod commented Apr 24, 2021

Copy link
Copy Markdown
Member

Oh, and we should double-check with the Cairo renderer, although I suspect it might have the same bug if this is happening at a layer above AGG/Cairo?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@safdarzareef safdarzareef mentioned this pull request Apr 24, 2021
I changed the offset code for draw_text for RendererAgg fixing issue #13044 #20057
Closed
7 tasks
@dstansby

dstansby commented Dec 18, 2021

Copy link
Copy Markdown
Member

Thanks for opening this PR. Unfortunately I don't think this is the correct fix. ymax1 - baseline / 2.0 seems to be the correct logic, putting the offset halfway between the baseline and ymax, so I think subtracting ymin1 is incorrect. As such I'm going to close this PR - if I've missed something feel free to comment and I will open it up again, and thanks again for the contribution.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dstansby dstansby closed this Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

status: needs rebase status: needs revision status: orphaned PR

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@Alex-Carter01 @jklymak @story645 @WeatherGod @dstansby
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.