Saving graphviz and arviz outputs


I’m asking this since I’m a newbie and I couldn’t find a definitive answer.
How do I save the model_to_graphviz, arviz.summary as png files?

Thanks a lot!

1 Like

model_to_graphviz returns a so you can save that via the formats supported.
So for example, if you save your graph into a variable g, g = pm.model_to_graphviz(model) you can save those via g.render("graphname", format="png"). As for saving tables, something like this could work, but you will probably have to fix the rendering a bit. You can alternatively also run to_latex(), to_markdown() or to_html() on your summary table to save it.