Yes, you can do this, but you need to do this using a separate mechanism, except for the argument c . In short, use facecolors=rgb_array .
First of all, let me explain what is happening. Collection that scatter returns has two βsystemsβ (due to the lack of a better term) for setting colors.
If you use the argument c , you set the colors through the ScalarMappable system ScalarMappable "This indicates that colors should be controlled by applying a color scheme to a single variable. (This is the set_array method of everything that inherits from ScalarMappable .)
In addition to the ScalarMappable system, collection colors can be set independently. In this case, you should use facecolors kwarg.
As a quick example, these points will have random rgb colors:
import matplotlib.pyplot as plt import numpy as np x, y = np.random.random((2, 10)) rgb = np.random.random((10, 3)) fig, ax = plt.subplots() ax.scatter(x, y, s=200, facecolors=rgb) plt.show()

source share