Closed
Description
Bug summary
Export to .eps-format of patches that are filled with a colored hatch pattern appear in greyscale color when linewidth of the patch is set to zero.
Code for reproduction
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse
ax = plt.gca()
ax.add_patch(Ellipse((0, 0), 1, 1, hatch='/', facecolor='none', edgecolor='r', linewidth=0))
plt.savefig(r"E:\mwe.png")
plt.savefig(r"E:\mwe.eps")
plt.show()
Actual outcome
.eps-file converted to .png-format using GIMP 2.10.30
Expected outcome
.png-file exported by matplotlib
.eps-file exported by matplotlib with linewidth > 0 converted to .png-format using GIMP 2.10.30
Additional information
It happens when linewidth is set to zero.
I don't know if it worked in earlier versions.
I had a look on the eps-commands in the file. (I don't know anything about eps-format.) It is most likely due to certain eps-commands being removed when linewidth is set to zero, including a command for the line color.
Operating system
Windows 10
Matplotlib Version
3.5.1
Matplotlib Backend
TkAgg
Python version
3.9.10
Jupyter version
n/a
Installation
pip