DimPlot: 栅格化

保留坐标轴,对点层做栅格化

sc.pl.tsne(scanpy_object_integrated, color='Annotation_broad', show=False, size=2)

ax = plt.gca()
for coll in ax.collections: coll.set_rasterized(True)     '#栅格化点层

fig_used=plt.gcf()     # capture the new plot
fig_used.set_size_inches(6,6)     # change the size of the current plot
fig_used.savefig("/data/plot___1___tSNE___1.pdf", format="pdf", dpi=600, bbox_inches="tight")

Note: dpi=600,注意要使用高分辨率

去除坐标轴,对点层做栅格化

sc.pl.tsne(scanpy_object_integrated, color='Annotation_broad', show=False, frameon=False, title='', legend_loc=None, size=2)

ax = plt.gca()
for coll in ax.collections: coll.set_rasterized(True)     '#栅格化点层

plt.gca().set_frame_on(False)         # 去除坐标轴边框
plt.gca().axis('off')

fig_used=plt.gcf()     # capture the new plot
fig_used.set_size_inches(6,6)     # change the size of the current plot
fig_used.savefig("/data/plot___1___tSNE___2.pdf", format="pdf", dpi=600, bbox_inches="tight")

Note: dpi=600,注意要使用高分辨率

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容