You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature request - Plot a scatter plot using a colormap rather than individually creating pens for each plot point.
This may be something that I have missed in the documentation however is it possible to plot a scatter with x,y,c where c is an array of colour values to be mapped using a colormap.
Currently I am achieving this by creating an array of pens and brushes which I then use for each spot.
brushes = [pg.mkBrush(QtGui.QColor(*c)) for c in color]
pens = [pg.mkPen(color=QtGui.QColor(*c), width=width) for c in edgecolors]
spi = pg.ScatterPlotItem(
spots=[
{
"pos": (x_data[i], y_data[i]),
"pen": pens[i],
"brush": brushes[i],
"size": size[i],
}
for i in range(len(x_data))
],
...
Thanks in advance.
The text was updated successfully, but these errors were encountered:
I'm going to close out that issue, as I think the discussion pijyoi linked to is highly relevant to what you were seeking. The documentation could likely use some work to make this clearer, and a PR would be accepted to that effect. Let us know if you're still having troubles.
Feature request - Plot a scatter plot using a colormap rather than individually creating pens for each plot point.
This may be something that I have missed in the documentation however is it possible to plot a scatter with x,y,c where c is an array of colour values to be mapped using a colormap.
Currently I am achieving this by creating an array of pens and brushes which I then use for each spot.
Thanks in advance.
The text was updated successfully, but these errors were encountered: