8000 Saving plot as PNG file prunes tick labels · Issue #12564 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content 8000
Saving plot as PNG file prunes tick labels  #12564
Closed
@JackCaster

Description

@JackCaster

Bug report

Bug summary
When I export a plot to PNG, some tick labels are pruned. This does not happen if I use another format, such as PDF or SVG.
Code for reproduction
I failed to recreate the problem with a dummy dataset. It seems that the problem is very much an edge case probably. This is what I see on my Jupyter notebook:
image

The plot is exported nicely in PDF: test.pdf

But, if I use PNG, the bottom and upper y-tick labels are pruned:
test

I tried to play around with the padding in plt.tight_layout() and the options in plt.savefig() without success.

Matplotlib version

  • Operating system: Windows 10 Pro N
  • Matplotlib version: 3.0.0 (from Conda)
  • Matplotlib backend: module://ipykernel.pylab.backend_inline
  • Python version: 3.6.6 (from Conda)
  • Jupyter version (if applicable): 1.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0