<jupyter_start><jupyter_text>Fonts in `tueplots` follow the same interface as the other settings.There are some pre-defined font recipes for a few journals, and they return dictionaries that are compatible with `matplotlib.pyplot.rcParams.update()`.<jupyter_code>fonts.neurips2021()<jupyter_output><empty_output><jupyter_text>Compare the following default font to some of the alternatives that we provide:<jupyter_code>fig, ax = plt.subplots()
ax.plot([1.0, 2.0], [3.0, 4.0])
ax.set_title("Title")
ax.set_xlabel("xlabel $\int f(x) dx$")
ax.set_ylabel("ylabel $x \sim \mathcal{N}(x)$")
plt.show()
plt.rcParams.update(fonts.jmlr2001_tex(family="serif"))
fig, ax = plt.subplots()
ax.plot([1.0, 2.0], [3.0, 4.0])
ax.set_title("Title")
ax.set_xlabel("xlabel $\int_a^b f(x) dx$")
ax.set_ylabel("ylabel $x \sim \mathcal{N}(x)$")
plt.show()
plt.rcParams.update(fonts.jmlr2001_tex(family="sans-serif"))
fig, ax = plt.subplots()
ax.plot([1.0, 2.0], [3.0, 4.0])
ax.set_title("Title")
ax.set_xlabel("xlabel $\int_a^b f(x) dx$")
ax.set_ylabel("ylabel $x \sim \mathcal{N}(x)$")
plt.show()
plt.rcParams.update(fonts.neurips2021())
fig, ax = plt.subplots()
ax.plot([1.0, 2.0], [3.0, 4.0])
ax.set_title("Title")
ax.set_xlabel("xlabel $\int_a^b f(x) dx$")
ax.set_ylabel("ylabel $x \sim \mathcal{N}(x)$")
plt.show()
plt.rcParams.update(fonts.neurips2021(family="sans-serif"))
fig, ax = plt.subplots()
ax.plot([1.0, 2.0], [3.0, 4.0])
ax.set_title("Title")
ax.set_xlabel("xlabel $\int_a^b f(x) dx$")
ax.set_ylabel("ylabel $x \sim \mathcal{N}(x)$")
plt.show()
plt.rcParams.update(fonts.neurips2021_tex(family="sans-serif"))
fig, ax = plt.subplots()
ax.plot([1.0, 2.0], [3.0, 4.0])
ax.set_title("Title")
ax.set_xlabel("xlabel $\int_a^b f(x) dx$")
ax.set_ylabel("ylabel $x \sim \mathcal{N}(x)$")
plt.show()
plt.rcParams.update(fonts.neurips2021_tex(family="serif"))
fig, ax = plt.subplots()
ax.plot([1.0, 2.0], [3.0, 4.0])
ax.set_title("Title")
ax.set_xlabel("xlabel $\int_a^b f(x) dx$")
ax.set_ylabel("ylabel $x \sim \mathcal{N}(x)$")
plt.show()
plt.rcParams.update(fonts.beamer_moml())
fig, ax = plt.subplots()
ax.plot([1.0, 2.0], [3.0, 4.0])
ax.set_title("Title")
ax.set_xlabel("xlabel $\int_a^b f(x) dx$")
ax.set_ylabel("ylabel $x \sim \mathcal{N}(x)$")
plt.show()
with plt.rc_context(fonts.icml2022()):
    fig, ax = plt.subplots()
    ax.plot([1.0, 2.0], [3.0, 4.0])
    ax.set_title("Title")

    ax.set_xlabel("xlabel $\int_a^b f(x) dx$")
    ax.set_ylabel("ylabel $x \sim \mathcal{N}(x)$")
    plt.show()
with plt.rc_context(fonts.icml2022_tex(family="sans-serif")):
    fig, ax = plt.subplots()
    ax.plot([1.0, 2.0], [3.0, 4.0])
    ax.set_title("Title")
    ax.set_xlabel("xlabel $\int_a^b f(x) dx$")
    ax.set_ylabel("ylabel $x \sim \mathcal{N}(x)$")
    plt.show()
with plt.rc_context(fonts.icml2022_tex(family="serif")):
    fig, ax = plt.subplots()
    ax.plot([1.0, 2.0], [3.0, 4.0])
    ax.set_title("Title")
    ax.set_xlabel("xlabel $\int_a^b f(x) dx$")
    ax.set_ylabel("ylabel $x \sim \mathcal{N}(x)$")
    plt.show()
plt.rcParams.update(fonts.aistats2022_tex(family="serif"))
fig, ax = plt.subplots()
ax.plot([1.0, 2.0], [3.0, 4.0])
ax.set_title("Title")
ax.set_xlabel("xlabel $\int_a^b f(x) dx$")
ax.set_ylabel("ylabel $x \sim \mathcal{N}(x)$")
plt.show()
plt.rcParams.update(fonts.aistats2022_tex(family="sans-serif"))
fig, ax = plt.subplots()
ax.plot([1.0, 2.0], [3.0, 4.0])
ax.set_title("Title")
ax.set_xlabel("xlabel $\int_a^b f(x) dx$")
ax.set_ylabel("ylabel $x \sim \mathcal{N}(x)$")
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2301160486838381, 'fraction_numerical': 0.04302292669119728, 'mean_word_length': 5.135416666666667, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '145940', 'license': 'MIT', 'n_tokens_mistral': 1697, 'n_tokens_neox': 1601, 'n_words': 276, 'path': 'examples/fonts.ipynb', 'repo_name': 'SirRob1997/tueplots', 'size': '3533'}