Thanks to visit codestin.com
Credit goes to github.com

Skip to content

imsave gives blank pdf/eps  #9203

@zimmerrol

Description

@zimmerrol

Bug report

Bug summary

the plt.imsave(..) method creates a blank file using the .pdf/.eps format.

Code for reproduction

import matplotlib.pyplot as plt
import numpy as np
data = np.arange(100*100).reshape(100, 100).astype(float)
plt.imsave("test.pdf", data, origin="lower", format="pdf") #same behavior also with eps instead of pdf

Actual outcome

A blank .pdf/.eps is created (see test.pdf)

Expected outcome
A non-blank .pdf which shows the same plot as the .png version of the code:

Matplotlib version

  • Operating System: Windows 10 Pro x64
  • Matplotlib Version: 2.0.2
  • Python Version: 3.6
  • Other Libraries: numpy 1.12.1

I installed matplotlib via anaconda.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.backend: pdf

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions