brazerzkidailighting.blogg.se

Pyplot scatter
Pyplot scatter











So for example, if I have 3 arrays, then the first array to be plotted is always color 'x', the second is always color 'y' and the third is always color 'z'.

pyplot scatter pyplot scatter

I could use plt.scatter(x, y, s=50, marker='s',facecolors='none',edgecolor=np.random.rand(3,))Īs I've seen answered on this SO, but this is not ideal, as I'm hoping to have deterministic colors between runs.

PYPLOT SCATTER SERIES

However, since my actual data will consist of a variable number of arrays, with the actual number being unknown before runtime, I'm looking to plot each data series in the same scatter plot and with different colors, but without having to explicitly specify what colors to use. Then I do indeed see a series of data plots represented by unfilled red squares, but the downside is that I have to explicitly set what color I want using edgecolor. If I instead use plt.scatter(x, x**2, s=50, marker='s',facecolors='none',edgecolors='r') Which unfills the square markers, but does not leave any marker edges, so no output is actually seen. To that end, I tried using the following code: import matplotlib.pyplot as plt I'm trying to produce a series of scatter plots with square and unfilled markers for each data point, with different but deterministic marker colors between runs, for each array.











Pyplot scatter