8000 legend's framealpha kwarg does not apply when writing to an eps file · Issue #13604 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
legend's framealpha kwarg does not apply when writing to an eps file #13604
Closed
@canerozer

Description

@canerozer

Bug summary
Hello,

I plot an arbitrary signal and I use the legend with framealpha kwarg. Then, I try to save the plot in both eps and png formats however framealpha is not being used when the savefig command renders the plot in eps format despite it is for png.

Code for reproduction

import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches


t = np.arange(20)
x = np.hstack((-1.5*np.ones(10), np.zeros(10)))

fig, ax = plt.subplots()

ax.plot(t, x, 'blue')

blue = mpatches.Patch(color='blue', label="A Random Signal")
ax.legend(handles=[blue], loc=3, framealpha=0.5)

fig.savefig("test.png")
fig.savefig("test.eps", format="eps")
  • Operating system: Ubuntu 16.04
  • Matplotlib version: 3.0.3
  • Matplotlib backend (print(matplotlib.get_backend())): TkAgg
  • Python version: Python 3.5.2
  • Jupyter version (if applicable): 1.0.0
  • Other libraries: jupyterlab==0.35.4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0