CaptainNaoe

[python] plotting misc

Jan 16th, 2021 (edited)
786
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def export_legend(legend, filename="results/legend.pdf"):
  2.     fig = legend.figure
  3.     fig.canvas.draw()
  4.     bbox = legend.get_window_extent().transformed(fig.dpi_scale_trans.inverted())
  5.     fig.savefig(filename, dpi=200, bbox_inches=bbox)
  6.  
  7. ax.tick_params(axis='both', which='major', labelsize=16)
  8.  
  9. plt.rcParams["font.weight"] = "bold"
  10. plt.rcParams["axes.labelweight"] = "bold"
RAW Paste Data