Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alpha value of markeredgecolor is overwritten by markerfacecolor #4914

Closed
hitzg opened this issue Aug 13, 2015 · 2 comments
Closed

alpha value of markeredgecolor is overwritten by markerfacecolor #4914

hitzg opened this issue Aug 13, 2015 · 2 comments

Comments

@hitzg
Copy link

hitzg commented Aug 13, 2015

When setting both the markeredgecolor and the markerfacecolor as a rgba tuple, the transparency of both seems to be set to the one of markerfacecolor. Could this be a bug in matplotlib or am I making a mistake?

Minimal-ish example:

import matplotlib.pyplot as plt

# plot markers with varying alpha values for edge and face colors
alpha_faces = [1.0, 0.3, 0.7, 0.3]
alpha_edges = [1.0, 0.3, 0.3, 1.0]
for n, (af, ae) in enumerate(zip(alpha_faces, alpha_edges)):
    plt.plot(n, 0, ms=20, mew=5, marker='s',  mfc=(1,0,0,af), mec=(0,0,1,ae))
    plt.text(n, 0.01, "$\\alpha$ edge: {}\n$\\alpha$ face {}".format(ae, af),
            va='bottom', ha='center')

# a black line to make the transparency clearer
plt.axhline(0, color='k', lw=3, zorder=0)

plt.xlim(-0.5, n+0.5)
plt.show()

Result:
figure_1

Versions: Ubuntu 12.04, python 2.7.3, matplotlib 1.4.3

I also posted this as a question on SO.

@mdehoon
Copy link
Contributor

mdehoon commented Aug 13, 2015

Duplicate of issue #4580 .

@mdehoon mdehoon closed this as completed Aug 13, 2015
@hitzg
Copy link
Author

hitzg commented Aug 13, 2015

Sorry, I couldn't find this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants