Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Jue-Xu committed Aug 3, 2024
1 parent d84538b commit 1e99389
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions quantum_simulation_recipe/plot_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@
mpl.rcParams['savefig.bbox'] = 'tight'
mpl.rcParams['savefig.transparent'] = True


def set_fontsize(SMALL_SIZE=14, MEDIUM_SIZE=18, LARGE_SIZE=24):
plt.rc('font', size=MEDIUM_SIZE) # controls default text sizes
plt.rc('axes', titlesize=LARGE_SIZE) # fontsize of the axes title
plt.rc('axes', labelsize=LARGE_SIZE) # fontsize of the x and y labels
plt.rc('xtick', labelsize=LARGE_SIZE) # fontsize of the tick labels
plt.rc('ytick', labelsize=LARGE_SIZE) # fontsize of the tick labels
plt.rc('legend', fontsize=MEDIUM_SIZE) # legend fontsize
plt.rc('figure', titlesize=LARGE_SIZE) # fontsize of the figure title
SMALL_SIZE, MEDIUM_SIZE, LARGE_SIZE = 14, 18, 24

def set_fontsize(small=SMALL_SIZE, medium=MEDIUM_SIZE, large=LARGE_SIZE):
plt.rc('font', size=medium) # controls default text sizes
plt.rc('axes', titlesize=large) # fontsize of the axes title
plt.rc('axes', labelsize=large) # fontsize of the x and y labels
plt.rc('xtick', labelsize=large) # fontsize of the tick labels
plt.rc('ytick', labelsize=large) # fontsize of the tick labels
plt.rc('legend', fontsize=medium) # legend fontsize
plt.rc('figure', titlesize=large) # fontsize of the figure title

set_fontsize()

Expand Down

0 comments on commit 1e99389

Please sign in to comment.