Coloring hvplot points?

It would be nice to be able to set the color of points using hvplot points. I don’t see this documented.

https://hvplot.holoviz.org/reference/geopandas/points.html

Here is how I did it on one of my pet projects which worked:

p = data.hvplot.points("longitude","latitude",c="flag",geo=True,tiles="OSM",
                                    cmap=["#000088","#0000FF","#880088","#FF9900"],alpha=0.6,
                                    xlim=x_coords,ylim=y_coords,
                                    yaxis=None,xaxis=None,s=144,legend="top",colorbar=False)

where x_coords and y_coords were used just to define the coordinates to center on when first loaded. Note my data source’s column flag had 4 discrete and different classes, hence the 4 colors passed into cmap.

1 Like