Hi Silvia,
This google groups is specifically meant for users of the
estimationstats.com webapp. Nevertheless we can offer a possible solution here.
You can control the color of the slopegraph lines with the `custom_palette` keyword.
If you want all the slopegraph lines to be the same color, you should create a "dummy" variable, assign it as the `color_col`, then pass a custom dictionary as the palette:
import numpy as np
import pandas as pd
import dabest
# The number of samples
Ns = 20
# Create samples
c1 = norm.rvs(loc=3, scale=0.4, size=Ns)
t1 = norm.rvs(loc=3.5, scale=0.5, size=Ns)
# Add an `id` column for paired data plotting.
id_col = pd.Series(range(1, Ns+1))
# Create the DataFrame.
df = pd.DataFrame({'Control 1' : c1, 'Test 1' : t1,
'dummy': np.repeat("not_relevant", len(c1)), # the dummy column.
'ID' : id_col
})
# Load into dabest
two_groups_paired = dabest.load(df,
idx=("Control 1", "Test 1"),
paired=True, id_col="ID")
# Create plot
my_color_palette = {"not_relevant" : "blue"} # change the color here.
two_groups_paired.mean_diff.plot(color_col="dummy", custom_palette= my_color_palette);
Unfortunately not. If the individual categories aren't assigned any color, the bootstrap distribution remains grey. I suppose an argument could be made about allowing the user to alter the distribution color at will, but I'm not sure of the benefits of that versus trying to uphold or establish a design language where the distribution color is tied to categorical identity.
Hope this helps!