import seaborn as sns
sns.set(style="ticks")
dots = sns.load_dataset("dots")
palette = dict(zip(dots.coherence.unique(),
sns.color_palette("rocket_r", 6)))
# Plot the lines on two facets
sns.relplot(x="time", y="firing_rate",
hue="coherence", size="choice", col="align",
size_order=["T1", "T2"], palette=palette,
height=5, aspect=.75, facet_kws=dict(sharex=False),
kind="line", legend="full", data=dots)
Line plots on multiple facets
未经允许不得转载:0dayhub » Line plots on multiple facets