Skip to content

Blank EPS figures if plot contains 'd' #19979

@sussexwearlab

Description

@sussexwearlab

Bug report

Bug summary

Matplotlib >= 3.4.0 generate blank EPS if the plot contains the character 'd' in any label, tick or title.

Code for reproduction

import matplotlib.pyplot as plt
import numpy as np

x = np.arange(0, 100)
y = np.random.randint(0, 100, size=(x.shape))
fig = plt.figure()
subplt = fig.add_subplot(111)
subplt.plot(x, y)
subplt.set_xlabel("data")
fig.savefig("test.eps", bbox_inches='tight', format='eps', dpi=1000)
plt.show()

Actual outcome

Blank figure.

Expected outcome

Actual figure saved as shown.

Matplotlib version

  • Operating system: Archlinux
  • Matplotlib version (import matplotlib; print(matplotlib.__version__)): >=3.4.0
  • Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg (But I also tried to delete matplotlibrc in order to revert to the default backend, which I guess is TkAgg)
  • Python version: 3.9
  • Jupyter version (if applicable): -
  • Other libraries:

Matplotlib was installed through the package manager of my distribution. Downgrading to Matplotlib 3.3.4 resolves the issue for the same figures.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions