.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/style_sheets/fivethirtyeight.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. meta:: :keywords: codex .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_style_sheets_fivethirtyeight.py: =========================== FiveThirtyEight style sheet =========================== This shows an example of the "fivethirtyeight" styling, which tries to replicate the styles from FiveThirtyEight.com. .. GENERATED FROM PYTHON SOURCE LINES 9-31 .. image-sg:: /gallery/style_sheets/images/sphx_glr_fivethirtyeight_001.png :alt: 'fivethirtyeight' style sheet :srcset: /gallery/style_sheets/images/sphx_glr_fivethirtyeight_001.png, /gallery/style_sheets/images/sphx_glr_fivethirtyeight_001_2_00x.png 2.00x :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import numpy as np plt.style.use('fivethirtyeight') x = np.linspace(0, 10) # Fixing random state for reproducibility np.random.seed(19680801) fig, ax = plt.subplots() ax.plot(x, np.sin(x) + x + np.random.randn(50)) ax.plot(x, np.sin(x) + 0.5 * x + np.random.randn(50)) ax.plot(x, np.sin(x) + 2 * x + np.random.randn(50)) ax.plot(x, np.sin(x) - 0.5 * x + np.random.randn(50)) ax.plot(x, np.sin(x) - 2 * x + np.random.randn(50)) ax.plot(x, np.sin(x) + np.random.randn(50)) ax.set_title("'fivethirtyeight' style sheet") plt.show() .. _sphx_glr_download_gallery_style_sheets_fivethirtyeight.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: fivethirtyeight.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: fivethirtyeight.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_