关注于数据分析的小站

Line plots on multiple facets

https://i0.wp.com/seaborn.pydata.org/_images/faceted_lineplot.png?ssl=1


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)
            
赞(1)
未经允许不得转载:0dayhub » Line plots on multiple facets
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
%d 博主赞过: