Skip to content

Commit 45bc1f6

Browse files
committed
Fix Issue #144
1 parent 6fe6339 commit 45bc1f6

3 files changed

Lines changed: 39 additions & 167 deletions

File tree

dabest/plotter.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,8 @@ def EffectSizeDataFramePlotter(EffectSizeDataFrame, **plot_kwargs):
418418
pivot_values = [yvar]
419419
else:
420420
pivot_values = [yvar, color_col]
421+
# pivoted_plot_data = plot_data.pivot_table(index=dabest_obj.id_col,
422+
# columns=xvar, values=pivot_values, fill_value='')
421423
pivoted_plot_data = pd.pivot(data=plot_data, index=dabest_obj.id_col,
422424
columns=xvar, values=pivot_values)
423425
x_start = 0
@@ -433,7 +435,7 @@ def EffectSizeDataFramePlotter(EffectSizeDataFrame, **plot_kwargs):
433435
slopegraph_kwargs['color'] = ytick_color
434436
else:
435437
color_key = observation[color_col][0]
436-
if isinstance(color_key, str) == True:
438+
if isinstance(color_key, (str, np.int64, np.float64)) == True:
437439
slopegraph_kwargs['color'] = plot_palette_raw[color_key]
438440
slopegraph_kwargs['label'] = color_key
439441

0 commit comments

Comments
 (0)