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

[WIP] Fix annotation get window extent#4023

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

Conversation

itziakos
Copy link
Contributor

This PR reworksAnnotation to provide a get_window_extent method that will return as bounding box the union of the contained text and arrow.

Pending:

  • more tests
  • cleanup

@tacaswell
Copy link
Member

Great!

This looks like it will need a re-base to current master already.

@itziakos
Copy link
ContributorAuthor

I am on it

Conflicts:lib/matplotlib/tests/test_text.py
@itziakos
Copy link
ContributorAuthor

conflict resolved, please note that I still need to fix and add a couple of tests

@image_comparison(baseline_images=['text_bboxclip'])
def test_bbox_clipping():
plt.text(0.9, 0.2, 'Is bbox clipped?', backgroundcolor='r', clip_on=True)
t = plt.text(0.9, 0.5, 'Is fancy bbox clipped?', clip_on=True)
t.set_bbox({"boxstyle": "round, pad=0.1"})


def test_text_annotation_get_window_extent():
Copy link
Member

Choose a reason for hiding this comment

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

It is easier to add the@cleanup decorator use pyplot to make your figure/axes objects.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe, I now see why you are doing it this way.

@tacaswelltacaswell added this to thev1.4.3 milestoneJan 26, 2015
@tacaswelltacaswell added the Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. labelJan 31, 2015
@tacaswell
Copy link
Member

I have cherry-picked these over to be based on the 1.4.x branch. I should have a version of this merged in the near future.

tacaswell added a commit that referenced this pull requestJan 31, 2015
…w-extentBUG : annotation objects did not report their window extent properl
@tacaswell
Copy link
Member

Merged in to v1.4.x as26c7d65

@itziakos
Copy link
ContributorAuthor

Thanks@tacaswell.

Sorry for the delay. I will make a separate PR for the additional tests.

@tacaswell
Copy link
Member

@itziakos Thanks for your work.

Sorry if you feel like I stepped on your toes, I wanted to get this in and this was the fastest path to get there.

@itziakos
Copy link
ContributorAuthor

Sorry if you feel like I stepped on your toes, I wanted to get this in and this was the fastest path to get there.

There was no offense taken, It is me who should apologize for the delay.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Milestone
v1.4.3
Development

Successfully merging this pull request may close these issues.

2 participants
@itziakos@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp