Merge pull request #121 from jedie/patch-2

[MRG] Save plot when filename is specified
This commit is contained in:
Vinayak Mehta
2020-08-14 02:36:28 +05:30
committed by GitHub
+7 -1
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