I'm looking for a way to change the default edge color for matplotlib scatter plots. Typically, things like that would be set through rcParams, and my understanding is that I should set patch.edgecolor. However, that doesn't seem to work. Here is an example:
import numpy as np
from matplotlib import pyplot as plt
x = np.random.randn(50)
y = np.random.randn(50)
with plt.rc_context({'patch.edgecolor': 'white'}):
plt.subplot(121)
plt.scatter(x, y)
plt.subplot(122)
plt.scatter(x, y, edgecolors='white')
In the result, I would like to have both subplots look the same, but instead they look like this:
Note that I don't want to change the code within the with statement, but instead configure matplotlib such that it uses white edges as a fallback if I don't specify anything else. Confusingly, the documentation uses a default argument edgecolors=None in the function signature, but states that the default value for edgecolors is 'face'. How can I change this behaviour?
plt.rcParams["lines.markeredgewidth"] = 2,plt.rcParams["lines.markersize"] = 10, andplt.rcParams["scatter.marker"] = 'o'