
# 创建1行3列的子图布局,每个子图大小为15x4英寸
fig, axs = plt.subplots(1, 3, figsize=(15, 4))
# 使用Scanpy的violin函数绘制三个质量控制指标的分布图
sc.pl.violin(combined_adata, ['n_genes_by_counts', 'total_counts', 'pct_counts_mt'],
jitter=0.4, multi_panel=True, show=False, ax=axs)
# 调整子图间距以避免重叠
plt.tight_layout()
# 显示图形
plt.show()
# 打印数据过滤前的形状信息
print(f"Combined dataset shape before filtering cells and genes: {combined_adata.shape}")
