Skip to content

Commit

Permalink
started editing fig 4 to make it larger.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonleandergrimm committed Nov 17, 2023
1 parent af8719e commit b36aa09
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions figures/composite_fig_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def adjust_axes(ax, predictor_type: str) -> None:
ax.spines["right"].set_visible(False)
ax.spines["top"].set_visible(False)
ax.spines["left"].set_visible(False)
print(ax.get_xticks()[1:-1])
ax.vlines(
ax.get_xticks()[1:-1],
*ax.get_ylim(),
Expand Down Expand Up @@ -284,22 +283,11 @@ def composite_figure(
input_data: pd.DataFrame,
) -> plt.Figure:
fig = plt.figure(
figsize=(7, 12),
figsize=(5, 8),
)
gs = fig.add_gridspec(2, 1, height_ratios=[5, 12], hspace=0.2)
plot_incidence(data, input_data, fig.add_subplot(gs[0, 0]))
plot_prevalence(data, input_data, fig.add_subplot(gs[1, 0]))

# comp_x_lims = [
# min(ax_0.get_xlim() + ax_1.get_xlim()),
# max(ax_0.get_xlim() + ax_1.get_xlim()),
# ]
# print(comp_x_lims)
# fig.axs[0].set_xlim(comp_x_lims)
# fig.axs[1].set_xlim(comp_x_lims)
# # ax_0.set_xlim(comp_x_lims)
# # ax_1.set_xlim(comp_x_lims)

return fig


Expand Down Expand Up @@ -330,7 +318,7 @@ def start() -> None:
input_df["location"] = input_df.fine_location

fig = composite_figure(fits_df, input_df)

fig.show()
save_plot(fig, figdir, "composite_fig_4")


Expand Down

0 comments on commit b36aa09

Please sign in to comment.