You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[ENH]: Fillstyle or just empty symbols in scatter #32012
I would like to be able to easily create open symbols with scatter that also have dynamically colored edges (e.g., with the c argument set to an array). Open symbols are important because I want to be able to see through one marker if it overlaps one below it, which isn't possible if you just overplot smaller white symbols onto colored markers.
Every option I can find will only produce open symbols which all have the same color edge, including this option:
This is achievable in scatter by plt.scatter(x, y, marker=MarkerStyle('o', fillstyle='none')).
This produces black open circles in my code, instead of dynamically colored circles.
Here is a MWE that I've tested on Matplotlib 3.10.0 and 3.11.0
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.markers import MarkerStyle
rng = np.random.default_rng()
x = rng.normal(size=100)
y = rng.normal(size=100)
z = rng.uniform(size=100)
# Produces a dynamically colored scatter plot with solid circles, as expected
plt.scatter(x,y,c=z)
# Should produce a dynamically colored scatter plot with open circles, but doesn't
plt.scatter(x,y,c=z,marker=MarkerStyle('o', fillstyle='none'),cmap="viridis",vmin=0,vmax=1)
The last command produces the warning
/tmp/ipykernel_2642/88283468.py:2: UserWarning: No data for colormapping provided via 'c'. Parameters 'cmap', 'vmin', 'vmax' will be ignored
even though I did specify data for colormapping with 'c'. And it generates this image
Layering points ends up looking sloppy, and doesn't preserve the "see-through" nature of open symbols
plt.scatter(x,y,c=z)
plt.scatter(x,y,c="w",s=9,)
I created a new request instead of adding to [#20360] because I don't need a shortcut to do this, I just need the capability. Thank you for considering this request
I think this is a duplicate of #20360 and perhaps it would be better to keep discussion in one spot; I'd invite you to add context there. FWIW I think the solution is relatively clear, someone just needs to decide to implement it.
Activity
jklymak commentedon Jul 7, 2026
I think this is a duplicate of #20360 and perhaps it would be better to keep discussion in one spot; I'd invite you to add context there. FWIW I think the solution is relatively clear, someone just needs to decide to implement it.
melissawm commentedon Jul 9, 2026
Thanks @stephtdouglas !
rcomer commentedon Jul 10, 2026
@stephtdouglas there is a workaround here: #24404 (comment)