<commit_before>"""
MultiAxes Plot
==============
This example shows how to create a multi-axis plot with tied zoom.

It uses the iris dataset from scikit-learn.
"""
import numpy as np
import matplotlib.pyplot as plt
from sklearn.datasets import load_iris

from mpld3 import show_d3

data = load_iris()
X = data.data
y = data.target

# dither the data for clearer plotting
X += 0.1 * np.random.random(X.shape)

fig, ax = plt.subplots(4, 4, sharex="col", sharey="row", figsize=(8, 8))
fig.subplots_adjust(hspace=0.1, wspace=0.1)

for i in range(4):
    for j in range(4):
        ax[3 - i, j].scatter(X[:, j], X[:, i],
                             c=y, s=40, alpha=0.3)

# remove tick labels
for axi in ax.flat:
    for axis in [axi.xaxis, axi.yaxis]:
        axis.set_major_formatter(plt.NullFormatter())

show_d3()<commit_msg>DOC: add reset button to multiaxes<commit_after>"""
MultiAxes Plot
==============
This example shows how to create a multi-axis plot with tied zoom.

It uses the iris dataset from scikit-learn.
"""
import numpy as np
import matplotlib.pyplot as plt
from sklearn.datasets import load_iris

from mpld3 import show_d3, plugins

data = load_iris()
X = data.data
y = data.target

# dither the data for clearer plotting
X += 0.1 * np.random.random(X.shape)

fig, ax = plt.subplots(4, 4, sharex="col", sharey="row", figsize=(8, 8))
fig.subplots_adjust(left=0.05, right=0.95, bottom=0.05, top=0.95,
                    hspace=0.1, wspace=0.1)

for i in range(4):
    for j in range(4):
        ax[3 - i, j].scatter(X[:, j], X[:, i],
                             c=y, s=40, alpha=0.3)

# remove tick labels
for axi in ax.flat:
    for axis in [axi.xaxis, axi.yaxis]:
        axis.set_major_formatter(plt.NullFormatter())

# add a reset() button
plugins.connect(fig, plugins.ResetButton())

show_d3()
{'fraction_non_alphanumeric': 0.14427312775330398, 'fraction_numerical': 0.028634361233480177, 'mean_word_length': 3.2955082742316786, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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}}
{'dir': 'git-commits-cleaned', 'id': '6398470', 'n_tokens_mistral': 687, 'n_tokens_neox': 659, 'n_words': 203}