Re: Saving images created with d.plot

Dmitriy Morozov
 

Hi Xavi,

Calling savefig() should just work, you only need to remove show=True from the example. So to tweak the example on the plotting page:

d.plot.plot_diagram(dgms[1])
import matplotlib.pyplot as plt
plt.savefig('myfig.pdf') 

Let me know if it works.
Dmitriy


On Mon, Oct 29, 2018 at 7:09 PM <xavier.flores@...> wrote:

Greetings,

I would like to know if there is a quick way to save the plots generated by the plot_diagram and plot_bars. I know they use matplotlib, and I have tried to modify the file plot.py in the dionysus module to include the savefig feature, but I have not been successful. Any ideas?

Thanks for the help and keep up the amazing work,

Kind regards,

Xavi

Join dionysus@groups.io to automatically receive all group messages.