I am trying to do some EDA on the sklearn breast cancer dataset.
I can successfully create a scatterplot matrix with a legend using the hack outlined here: https://github.com/holoviz/hvplot/issues/210
hv.extension("bokeh")
matrix = hvplot.scatter_matrix(df.drop("target_name",axis=1),c="target")
legend_cheat=df.drop("target_name",axis=1).hvplot.scatter("mean area", "worst area", by="target", legend="right",
width=150, height=150
).opts("Scatter", size=0, xaxis=None, yaxis=None,
show_frame=False, toolbar=None)
matrix + legend_cheat
The plot is too large to show in full, however here is the top right hand corner with the legend:
Is there a way to set the scatter plots,histograms and legend to use the same colours? I thought that setting c="target"
for the scatter matrix and by="target"
for the legend scatterplot would make the colours match as per the example in the link above.
Thanks