Guest User

Untitled

a guest
Jan 21st, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. #Attempt #1
  2. params = {'axes.labelsize': 20,'axes.titlesize':20, 'legend.fontsize': 20, 'xtick.labelsize': 20, 'ytick.labelsize': 20}
  3. plt.rcParams.update(params)
  4.  
  5. ################################################
  6.  
  7. #Attempt #2
  8. MEDIUM_SIZE = 16
  9. BIGGER_SIZE = 12
  10.  
  11. font = {'family' : 'Arial','weight' : 'bold', 'size' : 22}
  12.  
  13. plt.rc('font', **font)
  14. plt.rc('font', size=MEDIUM_SIZE) # controls default text sizes
  15. plt.rc('axes', titlesize=MEDIUM_SIZE) # fontsize of the axes title
  16. plt.rc('axes', labelsize=MEDIUM_SIZE) # fontsize of the x and y labels
  17. plt.rc('xtick', labelsize=MEDIUM_SIZE) # fontsize of the tick labels
  18. plt.rc('ytick', labelsize=MEDIUM_SIZE) # fontsize of the tick labels
  19. plt.rc('legend', fontsize=BIGGER_SIZE) # legend fontsize
  20. plt.rc('figure', titlesize=BIGGER_SIZE) # fontsize of the figure title
  21.  
  22. ################################################
  23.  
  24. #Attempt #3
  25. plt.rcParams['axes.linewidth'] = 20.0
  26.  
  27. ################################################
  28.  
  29. #Attempt #4
  30. ax = plt.subplot(111, xlabel='x', ylabel='y', title='title')
  31. for item in ([ax.title, ax.xaxis.label, ax.yaxis.label] +
  32. ax.get_xticklabels() + ax.get_yticklabels()):
  33. item.set_fontsize(20)
Add Comment
Please, Sign In to add comment