# Saving graphviz and arviz outputs

**URL:** <https://discourse.pymc.io/t/saving-graphviz-and-arviz-outputs/4317>\
**Category:** Questions\
**Created:** [January 7, 2020, 10:08pm UTC](https://discourse.pymc.io/t/saving-graphviz-and-arviz-outputs/4317 "2020-01-07T22:08:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aniket](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/aniket/32/2400_2.png) [@Aniket](https://discourse.pymc.io/u/Aniket)\
**Post date:** [January 7, 2020, 10:08pm UTC](https://discourse.pymc.io/t/saving-graphviz-and-arviz-outputs/4317/1 "2020-01-07T22:08:22Z")

</div>

Hello,

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!

---

<div class="post-metadata">

**Author:** ![PabloLeon](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/pabloleon/32/2425_2.png) [@PabloLeon](https://discourse.pymc.io/u/PabloLeon)\
**Post date:** [April 16, 2020, 7:41pm UTC](https://discourse.pymc.io/t/saving-graphviz-and-arviz-outputs/4317/2 "2020-04-16T19:41:59Z")

</div>

`model_to_graphviz` returns a `graphviz.dot.Digraph` so you can save that via the [formats supported](https://graphviz.readthedocs.io/en/stable/manual.html#formats).  
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](https://stackoverflow.com/questions/46664082/save-statsmodels-results-in-python-as-image-file), 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.
