seaborn.objects.Paths#

class seaborn.objects.Paths(artist_kws=<factory>, color=<'C0'>, alpha=<1>, linewidth=<rc:lines.linewidth>, linestyle=<rc:lines.linestyle>)#

一個更快但較不靈活的標記,用於繪製多個路徑。

這個標記定義了以下屬性

顏色透明度線條寬度線條樣式

另請參閱

Path

一個依據資料點出現順序連接資料點的標記。

範例

Lines不同,這個標記在繪圖前不會對觀測值進行排序,使其適合繪製通過變數空間的軌跡

p = (
    so.Plot(networks)
    .pair(
        x=["5", "8", "12", "15"],
        y=["6", "13", "16"],
    )
    .layout(size=(8, 5))
    .share(x=True, y=True)
)
p.add(so.Paths())
../_images/objects.Paths_1_0.png

這個標記與Lines具有相同的屬性集

p.add(so.Paths(linewidth=1, alpha=.8), color="hemi")
../_images/objects.Paths_3_0.png