I am using the cellcharter.pl.shape_metrics function to generate shape metric plots from an AnnData object. The function successfully displays the plots in the active Matplotlib plotting context but does not provide a way to directly save the generated plots as a PDF file.
I also tried
with plt.rc_context(): # Use this to set figure params like size and dpi
cc.pl.shape_metrics...
plt.savefig('xxx.pdf', format='pdf')
but it doesn't work.
So how to save this figure? Thank you for your time and support!