scanpy change the pdf save path 修改保存地址的路径

scanpy change the pdf save path

修改保存地址的路径

 

figsavePath  =r'aaa\bbb\c'

fig, ax = plt.subplots()
with rc_context({'figure.figsize': (5, 5)}):
    sc.pl.umap(adata, color='choosed', add_outline=True, legend_loc='on data',
               legend_fontsize=12, legend_fontoutline=2, frameon=False,
               title='Leiden: clustering of neurons[{},{}]'.format(begin, end), palette='Set1',show=False)
# 然后对figure进行保存;
plt.savefig(r"{}/leidenCluster.svg".format(figsavePath), format="svg", transparent=True)
posted @ 2022-08-23 16:26  bH1pJ  阅读(48)  评论(0编辑  收藏  举报