Skip to content

Commit

Permalink
Use laTex for plots and increase the font size
Browse files Browse the repository at this point in the history
  • Loading branch information
diehlpk committed Jun 22, 2023
1 parent ea42b1f commit e2e4637
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions plotme.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
import sys
import numpy
from matplotlib.lines import Line2D
import matplotlib.pyplot as plt

plt.rcParams.update({
"text.usetex": True,
"font.family": "Helvetica",
"font.size": 18
})


if len(sys.argv)==2:
file='-'+sys.argv[1]
Expand Down Expand Up @@ -53,7 +61,6 @@
xdata[name] += [nthreads]
ydata[name] += [float(row[6])]

import matplotlib.pyplot as plt
import numpy as np
from scipy.optimize import curve_fit as cf

Expand Down Expand Up @@ -174,7 +181,7 @@ def rt(x, k, p, o, o2, o3):
#ax.legend(loc='upper center', bbox_to_anchor=(0.5, -0.15),
# fancybox=True, shadow=True, ncol=4)
plt.grid()
plt.xlabel("#cores")
plt.xlabel("\#cores")
plt.ylabel("Time [s]")
plt.title("nx="+nx+" and nt="+nt)
plt.savefig('plot'+file+'.pdf',bbox_inches='tight')
Expand Down

0 comments on commit e2e4637

Please sign in to comment.