Toam Toam - 1 year ago 187
Python Question

How to remove outline of circle marker when using pyplot.plot in matplotlib

I'm producing a scatter plot using pyplot.plot (instead of scatter - I'm having difficulties with the colormap)

I am plotting using the 'o' marker to get a circle, but the circle always has a black outline.

How do I remove the outline, or adjust its colour?

Answer Source

To remove the outline of a marker, and adjust its color, use markeredgewidth (aka mew), and markeredgecolor (aka mec) respectively.

Using this as a guide:

import numpy as np
import matplotlib.pyplot as plt

x = np.arange(0, 5, 0.1)
y = np.sin(x)


As you notice, even though the marker edge color is set, because the width of it is set to zero it doesn't show up.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download