Produced plot with correct layout
This commit is contained in:
@@ -2,6 +2,20 @@ from os import makedirs
|
||||
from pathlib import Path
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
import seaborn as sns
|
||||
|
||||
sns.set_theme()
|
||||
params = {
|
||||
"font.family": "Serif",
|
||||
"font.serif": "Roman",
|
||||
"text.usetex": True,
|
||||
"axes.titlesize": "large",
|
||||
"axes.labelsize": "large",
|
||||
"xtick.labelsize": "large",
|
||||
"ytick.labelsize": "large",
|
||||
"legend.fontsize": "medium",
|
||||
}
|
||||
plt.rcParams.update(params)
|
||||
|
||||
|
||||
def plot_timing(indir, outdir):
|
||||
@@ -35,9 +49,9 @@ def plot_timing(indir, outdir):
|
||||
ax1.set_xlabel(xlabel)
|
||||
ax1.set_ylabel("time (seconds)")
|
||||
|
||||
figure1.legend()
|
||||
ax1.legend()
|
||||
|
||||
figure1.savefig(Path(outdir, outfile))
|
||||
figure1.savefig(Path(outdir, outfile), bbox_inches="tight")
|
||||
|
||||
plt.close(figure1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user