<jupyter_start><jupyter_text>Test `FigureManager`<jupyter_code>%load_ext autoreload
%autoreload 2

import numpy as np
import matplotlib.pyplot as plt
from pydove import FigureManager<jupyter_output><empty_output><jupyter_text>Basic usage<jupyter_code>rng = np.random.default_rng(0)
with FigureManager() as (_, ax):
    ax.scatter(rng.normal(size=50), rng.normal(size=50))<jupyter_output><empty_output><jupyter_text>Two panels<jupyter_code>with FigureManager(1, 2) as (_, axs):
    x = np.linspace(0, 10, 100)
    for i, ax in enumerate(axs):
        ax.plot(x, np.sin(x), c=f"C{i}")<jupyter_output><empty_output><jupyter_text>More panels The context manager scales the figure size according to the number of panels so that each panel is the size of a standard figure.<jupyter_code>rng = np.random.default_rng(0)
with FigureManager(2, 2) as (_, axs):
    for ax in axs.flat:
        ax.scatter(rng.normal(size=200), rng.uniform(size=200))
        ax.set_xlim(-4, 4)<jupyter_output><empty_output><jupyter_text>Custom offset, additional keywords<jupyter_code>with FigureManager(
    1, 2, offset=5, gridspec_kw={"width_ratios": [1, 3]}, despine_kws={"left": True}
) as (fig, axs):
    x = np.linspace(0, 10, 100)
    for i, ax in enumerate(axs):
        ax.axhline(0, c="k", ls="--")
        ax.plot(x, np.sin(x), c=f"C{i}")
        ax.grid(axis="y", ls=":")
    fig.suptitle("Two sines")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14911660777385158, 'fraction_numerical': 0.026148409893992933, 'mean_word_length': 5.156521739130435, 'pattern_counts': {'":': 3, '<': 21, '<?xml version=': 0, '>': 21, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '244618', 'license': 'MIT', 'n_tokens_mistral': 579, 'n_tokens_neox': 554, 'n_words': 115, 'path': 'test/test_figure_manager.ipynb', 'repo_name': 'ttesileanu/pydove', 'size': '1415'}