diff --git a/plotly/figure_factory/_facet_grid.py b/plotly/figure_factory/_facet_grid.py index cc517cfb61..d0f401ecb1 100644 --- a/plotly/figure_factory/_facet_grid.py +++ b/plotly/figure_factory/_facet_grid.py @@ -413,7 +413,7 @@ def _facet_grid_color_numerical(df, x, y, facet_row, facet_col, color_name, mode='markers', type=trace_type, showlegend=False, - **kwargs + **kwargs_trace ) fig.append_trace(trace, row_count + 1, col_count + 1) if row_count == 0: @@ -783,7 +783,7 @@ def create_facet_grid(df, x, y, facet_row=None, facet_col=None, ) show_legend = False if color_name: - if isinstance(df[color_name][0], str) or color_is_cat: + if isinstance(df[color_name].iloc[0], str) or color_is_cat: show_legend = True if isinstance(colormap, dict): utils.validate_colors_dict(colormap, 'rgb') @@ -812,7 +812,7 @@ def create_facet_grid(df, x, y, facet_row=None, facet_col=None, marker_color, kwargs_trace, kwargs_marker ) - elif isinstance(df[color_name][0], Number): + elif isinstance(df[color_name].iloc[0], Number): if isinstance(colormap, dict): show_legend = True utils.validate_colors_dict(colormap, 'rgb')