{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Solarized Light stylesheet\n\nThis shows an example of \"Solarized_Light\" styling, which\ntries to replicate the styles of:\n\n- https://ethanschoonover.com/solarized/\n- https://github.com/jrnold/ggthemes\n- http://www.pygal.org/en/stable/documentation/builtin_styles.html#light-solarized\n\nand work of:\n\n- https://github.com/tonysyu/mpltools\n\nusing all 8 accents of the color palette - starting with blue\n\nStill TODO:\n\n- Create alpha values for bar and stacked charts. .33 or .5\n- Apply Layout Rules\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\nimport numpy as np\n\n# Fixing random state for reproducibility\nnp.random.seed(19680801)\n\nx = np.linspace(0, 10)\nwith plt.style.context('Solarize_Light2'):\n plt.plot(x, np.sin(x) + x + np.random.randn(50))\n plt.plot(x, np.sin(x) + 2 * x + np.random.randn(50))\n plt.plot(x, np.sin(x) + 3 * x + np.random.randn(50))\n plt.plot(x, np.sin(x) + 4 * x + np.random.randn(50))\n plt.plot(x, np.sin(x) + 5 * x + np.random.randn(50))\n plt.plot(x, np.sin(x) + 6 * x + np.random.randn(50))\n plt.plot(x, np.sin(x) + 7 * x + np.random.randn(50))\n plt.plot(x, np.sin(x) + 8 * x + np.random.randn(50))\n # Number of accent colors in the color scheme\n plt.title('8 Random Lines - Line')\n plt.xlabel('x label', fontsize=14)\n plt.ylabel('y label', fontsize=14)\n\nplt.show()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.2" } }, "nbformat": 4, "nbformat_minor": 0 }