Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def plot(title, **kwargs):
fig, ax = plt.subplots(1,1)
graph = netgraph.test(ax=ax, **kwargs)
fig.tight_layout()
fig.canvas.draw()
graph._update_view()
fig.savefig(FDIR + title.replace(' ', '_') + '.pdf')
fig.savefig(FDIR + title.replace(' ', '_') + '.svg')
plt.close()