fix(script): Fix display of fuller-width figures

This commit is contained in:
Marty Oehme 2023-12-09 20:41:29 +01:00
parent a681a5b6ff
commit c3b0d8cfd6
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -418,6 +418,7 @@ print(f"""
```{{mermaid}} ```{{mermaid}}
%%| label: fig-prisma %%| label: fig-prisma
%%| fig-cap: "Sample sorting process through identification and screening" %%| fig-cap: "Sample sorting process through identification and screening"
%%| fig-width: 6
flowchart TD; flowchart TD;
search_db["Records identified through database searching (n=1643)"] --> starting_sample; search_db["Records identified through database searching (n=1643)"] --> starting_sample;
search_prev["Records identified through other sources (n=753)"] --> starting_sample["Starting sample (n=2396)"]; search_prev["Records identified through other sources (n=753)"] --> starting_sample["Starting sample (n=2396)"];
@ -557,7 +558,6 @@ Should they point towards gaps (or over-optimization) of sepcific areas of inter
```{python} ```{python}
#| label: fig-intervention-types #| label: fig-intervention-types
#| fig-cap: Predominant type of intervention #| fig-cap: Predominant type of intervention
#| column: page
interv_type_df = ( interv_type_df = (
bib_df["zot_keywords"] bib_df["zot_keywords"]
@ -569,7 +569,7 @@ interv_type_df = (
sort_order = interv_type_df["intervention type"].value_counts(ascending=False).index sort_order = interv_type_df["intervention type"].value_counts(ascending=False).index
fig = plt.figure() fig = plt.figure()
fig.set_size_inches(12, 4) fig.set_size_inches(6, 3)
ax = sns.countplot(interv_type_df, x="intervention type", order=sort_order) ax = sns.countplot(interv_type_df, x="intervention type", order=sort_order)
plt.setp(ax.get_xticklabels(), rotation=45, ha="right", plt.setp(ax.get_xticklabels(), rotation=45, ha="right",
rotation_mode="anchor") rotation_mode="anchor")
@ -581,7 +581,6 @@ plt.show()
```{python} ```{python}
#| label: fig-inequality-types #| label: fig-inequality-types
#| fig-cap: Types of inequality analyzed #| fig-cap: Types of inequality analyzed
#| column: page
inequ_type_df = ( inequ_type_df = (
bib_df["zot_keywords"] bib_df["zot_keywords"]
@ -593,7 +592,7 @@ inequ_type_df = (
sort_order = inequ_type_df["inequality type"].value_counts(ascending=False).index sort_order = inequ_type_df["inequality type"].value_counts(ascending=False).index
fig = plt.figure() fig = plt.figure()
fig.set_size_inches(12, 4) fig.set_size_inches(6, 3)
ax = sns.countplot(inequ_type_df, x="inequality type", order=sort_order) ax = sns.countplot(inequ_type_df, x="inequality type", order=sort_order)
plt.setp(ax.get_xticklabels(), rotation=45, ha="right", plt.setp(ax.get_xticklabels(), rotation=45, ha="right",
rotation_mode="anchor") rotation_mode="anchor")