Skip to content

Commit

Permalink
Edited look of figure 6 to have virus label in the title and smaller …
Browse files Browse the repository at this point in the history
…fonts for x and y axis labels.
  • Loading branch information
simonleandergrimm committed Dec 18, 2023
1 parent f856147 commit b6efc0c
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions figures/composite_fig_6.py → figures/fig_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def start():
ax.set_title(
f"Detection Threshold: {detection_threshold}",
loc="center",
fontdict={"fontsize": 10},
)

color = f"C{i}"
Expand Down Expand Up @@ -171,9 +172,11 @@ def start():
)

ax.set_xticks([1e-4, 1e-3, 1e-2, 1e-1])
ax.set_xticklabels(["0.01%", "0.1%", "1%", "10%"])
ax.set_xticklabels(["0.01%", "0.1%", "1%", "10%"], fontsize=8)
ax.set_yticks([1e3, 1e6, 1e9, 1e12, 1e15])
ax.tick_params(axis="y", labelsize=8)
ax.set_xlim(1e-4, 1e-1)

ax.grid(
which="major",
linestyle="-",
Expand All @@ -187,7 +190,7 @@ def start():
for i, (top_ax, bottom_ax) in enumerate(zip(top_axes, bottom_axes)):
if i == 0:
for ax in top_ax, bottom_ax:
ax.set_ylabel("Reads required for detection")
ax.set_ylabel("Reads per week")
else:
for ax in top_ax, bottom_ax:
ax.tick_params(axis="y", which="both", left=False, right=False)
Expand All @@ -196,22 +199,37 @@ def start():

fig.axes[0].text(
-0.35,
1.08,
1.2,
"a",
fontweight="bold",
fontdict={"fontsize": 12},
transform=fig.axes[0].transAxes,
)
fig.axes[0].text(
-0.25,
1.2,
"(Norovirus GII)",
fontdict={"fontsize": 12},
transform=fig.axes[0].transAxes,
)

fig.axes[3].text(
-0.35,
1.08,
1.1,
"b",
fontweight="bold",
fontdict={"fontsize": 12},
transform=fig.axes[3].transAxes,
)

fig.axes[3].text(
-0.25,
1.1,
"(SARS-COV-2)",
fontdict={"fontsize": 12},
transform=fig.axes[3].transAxes,
)

legend = fig.axes[4].legend(
bbox_to_anchor=(0.5, -0.45),
loc="lower center",
Expand Down

0 comments on commit b6efc0c

Please sign in to comment.