Closed
Description
When trying to color a scatter plot by a bool
column datatype, the colors do not show:
(see attached file for data)
grouped.dtypes
mean_ape float64
measurement_type object
note object
parameters object
n_estimators int64
max_depth int64
bootstrap bool
max_features float64
fig = px.scatter(
grouped,
x="n_estimators",
y="mean_ape",
facet_row="measurement_type",
color="bootstrap",
title="Error vs Number of Estimators Colored by Bootstrap",
height=1000, width=1600
)
However, if I convert the bool
column to a str
, then the colors correctly appear:
new_grouped = grouped.copy()
new_grouped['bootstrap'] = new_grouped['bootstrap'].astype(str)
fig = px.scatter(
new_grouped,
x="n_estimators",
y="mean_ape",
facet_row="measurement_type",
color="bootstrap",
title="Error vs Number of Estimators Colored by Bootstrap",
height=1000, width=1600
)
Metadata
Metadata
Assignees
Labels
No labels