<jupyter_start><jupyter_text>A space for playing with the notebook  Plots<jupyter_code>## Basic imports (example)
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
from sloth.test.dummy_data import dummy_gauss_curve

fig, axs = plt.subplots(num='test', nrows=1, ncols=2)
x1, y1 = dummy_gauss_curve()
x2, y2 = dummy_gauss_curve(xsigma=5, noise=0.1)
axs[0].plot(x1, y1, label='g1', ls='--', color='red', lw=2)
axs[1].plot(x2, y2, label='g2', ls='-.', color='orange', lw=2)
fig.legend()<jupyter_output><empty_output><jupyter_text>Interactive widgets<jupyter_code>import ipywidgets as widgets
widgets.Checkbox(
    value=False,
    description='Check me',
    disabled=False
)<jupyter_output><empty_output><jupyter_text>Interactive Wx<jupyter_code>import wxmplot.interactive as wi
import numpy as np
x = np.linspace(0, 20, 201)
wi.plot(x, np.sin(x))<jupyter_output><empty_output><jupyter_text>Matplotlib plots<jupyter_code>from sloth.utils.plotter import Plotter
p = Plotter(nrows=1, ncols=4, title='test', figsize=(10,3))
import numpy as np
x = np.linspace(0, 20, 201)
y = np.sin(x)
p.plot(x, y, label='sin', win=0)
p.plot(x, y*x, label='sin*x', win=1, show_legend=dict(loc='lower left'))
p.plot(x, y*x**2, label='sin*x^2', win=2, show_legend=dict(loc='upper center'))
p.plot(x, -y*x**2/10+0.5, label='-sin*x^2/10+0.5', win=2, side='right')
p.plot(x, -y*x**2/10, label='-sin*x^2/10', win=2, side='right', show_legend=dict(frameon=True, fancybox=True, loc='lower left'))
p.plot(x, y+0.5, label='sin+0.5', win=0, show_legend=dict(loc='best'))
p.subplots_adjust(top=0.87)
p.legend()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1875768757687577, 'fraction_numerical': 0.04120541205412054, 'mean_word_length': 7.430051813471502, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '170864', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 729, 'n_tokens_neox': 697, 'n_words': 130, 'path': 'notebooks/sandbox.ipynb', 'repo_name': 'maurov/xraysloth', 'size': '1626'}