Merge pull request #121 from jedie/patch-2

[MRG] Save plot when filename is specified
pull/126/merge
Vinayak Mehta 2020-08-14 02:36:28 +05:30 committed by GitHub
commit 705473198f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -43,7 +43,13 @@ class PlotMethods(object):
)
plot_method = getattr(self, kind)
return plot_method(table)
fig = plot_method(table)
if filename is not None:
fig.savefig(filename)
return None
return fig
def text(self, table):
"""Generates a plot for all text elements present