Skip to content

FIX: bbox_inches='tight' with only non-finite bounding boxes#13426

Merged
tacaswell merged 1 commit into
matplotlib:masterfrom
tacaswell:fix_nan_only_tightbbox
Feb 18, 2019
Merged

FIX: bbox_inches='tight' with only non-finite bounding boxes#13426
tacaswell merged 1 commit into
matplotlib:masterfrom
tacaswell:fix_nan_only_tightbbox

Conversation

@tacaswell

@tacaswell tacaswell commented Feb 13, 2019

Copy link
Copy Markdown
Member

closes #13276

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 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

@tacaswell tacaswell added this to the v3.0.3 milestone Feb 13, 2019

@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 thought I fixed this already,... must have been somewhere else....

Comment thread lib/matplotlib/tests/test_bbox_tight.py Outdated
fig, ax = plt.subplots()
ax.annotate("", xy=(0, float('nan')))
ax.set_axis_off()
fig.savefig("bar.png", bbox_inches='tight')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please save to a BytesIO to avoid polluting the source tree.

@tacaswell tacaswell force-pushed the fix_nan_only_tightbbox branch from 1a4b6ee to 0302451 Compare February 18, 2019 18:55
@tacaswell

Copy link
Copy Markdown
Member Author

@anntzer done an force-pushed.

@anntzer

anntzer commented Feb 18, 2019

Copy link
Copy Markdown
Contributor

can be merged post-ci

@tacaswell tacaswell merged commit 6701206 into matplotlib:master Feb 18, 2019
@tacaswell tacaswell deleted the fix_nan_only_tightbbox branch February 18, 2019 19:42
@tacaswell

Copy link
Copy Markdown
Member Author

Self-merging on 3 approvals and CI passing.

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Feb 18, 2019
dstansby added a commit that referenced this pull request Feb 18, 2019
…426-on-v3.0.x

Backport PR #13426 on branch v3.0.x (FIX: bbox_inches='tight' with only non-finite bounding boxes)
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.

calling annotate with nan values for the position still gives error after 3.0.2

4 participants