plot.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:biotracks 作者: CellMigStandOrg 项目源码 文件源码
def plotXY(df, id_, x_coord, y_coord):
    """Plot the raw trajectories.

    df -- the trajectories dataframe
    id_ -- an identifier (for linear connections of objects)
    x_coord -- the x coordinate
    y_coord -- the y coordinate
    """
    grid = sns.FacetGrid(df, hue=id_,
                         size=6, palette=sns.color_palette("Set1", 10))
    grid.fig.suptitle('XY trajectories')
    grid.map(plt.plot, x_coord, y_coord, marker=".", ms=0.3)
    grid.map(plt.scatter, x_coord, y_coord, marker="o", s=20)
    grid.set_xticklabels(rotation=90)
    sns.plt.savefig("trajectories.png")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号