Closed
Description
import numpy as np
import matplotlib.pyplot as plt
N = 500
x = np.random.rand(N)
y = np.random.rand(N)
colors = np.random.rand(N+1)
fig, ax = plt.subplots()
ax.scatter(x, y, c=colors)
plt.show()
raises the following error:
ValueError: Invalid RGBA argument: 0.23991184171163127
which is absolutely unrelated to the problem. We need a better error message when the color is not of the correct shape.