Skip to content

update annotations - #11801

Merged
phobson merged 1 commit into
matplotlib:masterfrom
fredrik-1:annotation_update
Aug 6, 2018
Merged

phobson merged 1 commit into
matplotlib:masterfrom
fredrik-1:annotation_update

Conversation

@fredrik-1

Copy link
Copy Markdown
Contributor

I believe that it was the same problems with annotations as it was with spine. They are not updated before get_windows_extent where called and this make tight_layout and constrained_layout fail.

I hope this fix at least some of the issues in #11800.

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

This was referenced Jul 30, 2018
@jklymak jklymak added this to the v3.0 milestone Jul 31, 2018
@jklymak jklymak added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Jul 31, 2018
@jklymak

jklymak commented Jul 31, 2018

Copy link
Copy Markdown
Member

This could use a test if at all possible. Not thought about how to do that but one like the one for spines should do it.

I’ve marked release critical because it’s a bug just like the one for spines.

It would be good to look at connection patches as well or any other artist that uses transforms between axes.

I’m 50/50 if we should change the default back for get_tightbbox so that most artists have set_in_layout false instead of true. That would be more backwards compatible. OTOH it is nice to catch some of these transform setting bugs which I think were occasionally an annoyance for some of these more complex artists.

@jklymak jklymak 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.

This looks great, but needs a test!

@fredrik-1

Copy link
Copy Markdown
Contributor Author

I wrote a image comparison test but it fails on travis.

@jklymak

jklymak commented Aug 2, 2018

Copy link
Copy Markdown
Member

Do you have the testing free type installed?

@fredrik-1

Copy link
Copy Markdown
Contributor Author

No I haven't and I don't know how to install it either. The setup script say that I don't have VS 2010 installed even though I have. I don't have the knowledge or time to invest in trying to get the setup script to work on my computer.

One string seems to be just about windows7 but I don't believe that I even get that far.

@ImportanceOfBeingErnest

Copy link
Copy Markdown
Member

I think I have the same very issue with installing/compiling the necessary libraries for the image tests. This is windows specific. One thing I haven't tried out yet (because I was always able to find workarounds for the tests) is to use precompiled windows binaries, e.g. the ones provided here.

@fredrik-1

Copy link
Copy Markdown
Contributor Author

I wrote a different test that don't use image comparision. Lets see if it works. It could probably be even easier by comparing to the default bbox but I am not sure if that is good.

@fredrik-1
fredrik-1 force-pushed the annotation_update branch 2 times, most recently from a61693d to b7634a6 Compare August 3, 2018 12:39

@jklymak jklymak 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.

I agree this is necessary to make annotations be placed correctly. A before and after picture may help move the review process along...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants