From f8b6181988bf36152b731eb871bddf910f77fe86 Mon Sep 17 00:00:00 2001 From: Jens Diemer Date: Sun, 15 Mar 2020 13:20:27 +0100 Subject: [PATCH] Fix #120 - Save plot --- camelot/plotting.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/camelot/plotting.py b/camelot/plotting.py index 5e0dc0c..6d5def1 100644 --- a/camelot/plotting.py +++ b/camelot/plotting.py @@ -43,7 +43,12 @@ class PlotMethods(object): ) plot_method = getattr(self, kind) - return plot_method(table) + fig = plot_method(table) + + if filename: + fig.savefig(filename) + + return fig def text(self, table): """Generates a plot for all text elements present