<jupyter_start><jupyter_text>Pyplot Two SubplotsCreate a figure with two subplots with `.pyplot.subplot`.<jupyter_code>import numpy as np
import matplotlib.pyplot as plt


def f(t):
    return np.exp(-t) * np.cos(2*np.pi*t)


t1 = np.arange(0.0, 5.0, 0.1)
t2 = np.arange(0.0, 5.0, 0.02)

plt.figure()
plt.subplot(211)
plt.plot(t1, f(t1), color='tab:blue', marker='o')
plt.plot(t2, f(t2), color='black')

plt.subplot(212)
plt.plot(t2, np.cos(2*np.pi*t2), color='tab:orange', linestyle='--')
plt.show()<jupyter_output><empty_output><jupyter_text>------------References""""""""""The use of the following functions, methods, classes and modules is shownin this example:<jupyter_code>import matplotlib
matplotlib.pyplot.figure
matplotlib.pyplot.subplot<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18404118404118405, 'fraction_numerical': 0.03732303732303732, 'mean_word_length': 5.64957264957265, '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': '438543', 'license': 'MIT', 'n_tokens_mistral': 340, 'n_tokens_neox': 317, 'n_words': 61, 'path': 'matplotlib/gallery_jupyter/pyplots/pyplot_two_subplots.ipynb', 'repo_name': 'kingreatwill/penter', 'size': '777'}