visualize_5_10.py 302 B

1234567891011
  1. def get_figure(show, r, figtype, fig_name, theme, title):
  2. if title:
  3. plt.title(title)
  4. if show:
  5. plt.show()
  6. else:
  7. plt.savefig(fig_name+'.'+figtype, format=figtype, bbox_inches='tight', dpi=r)
  8. if theme:
  9. plt.style.use('default')
  10. plt.clf()
  11. plt.close()