8000 FIX: bbox_inches='tight' with only non-finite bounding boxes by tacaswell · Pull Request #13426 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

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

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

Merged
merged 1 commit into from
Feb 18, 2019

Conversation

tacaswell
Copy link
Member
@tacaswell tacaswell commented Feb 13, 2019

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
Copy link
Member
@jklymak jklymak left a comment

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

fig, ax = plt.subplots()
ax.annotate("", xy=(0, float('nan')))
ax.set_axis_off()
fig.savefig("bar.png", bbox_inches='tight')
Copy link
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
Member Author

@anntzer done an force-pushed.

@anntzer
Copy link
Contributor
anntzer commented Feb 18, 2019

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
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 Gi 75D5 tHub. 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
0