├── MANIFEST.in ├── requirements.txt ├── examples ├── line.png ├── output_6_0.png ├── output_7_0.png └── distribution_light.png ├── requirements_notebook.txt ├── Makefile ├── qbstyles ├── styles │ ├── qb-light.mplstyle │ ├── qb-dark.mplstyle │ └── qb-common.mplstyle ├── __init__.py └── mpl_style.py ├── .gitignore ├── LICENSE ├── setup.py └── README.md /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include qbstyles/styles/* 2 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | matplotlib>=3.0.3, <4.0 2 | -------------------------------------------------------------------------------- /examples/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mckinsey/qbstyles/HEAD/examples/line.png -------------------------------------------------------------------------------- /examples/output_6_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mckinsey/qbstyles/HEAD/examples/output_6_0.png -------------------------------------------------------------------------------- /examples/output_7_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mckinsey/qbstyles/HEAD/examples/output_7_0.png -------------------------------------------------------------------------------- /examples/distribution_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mckinsey/qbstyles/HEAD/examples/distribution_light.png -------------------------------------------------------------------------------- /requirements_notebook.txt: -------------------------------------------------------------------------------- 1 | matplotlib>=3.0.3, <4.0 2 | seaborn==0.8 3 | jupyter>=1.0, <2.0 4 | numpy>=1.14, <2.0 5 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | clean: 2 | rm -rf build dist pip-wheel-metadata 3 | find . -regex ".*/__pycache__" -exec rm -rf {} + 4 | find . -regex ".*\.egg-info" -exec rm -rf {} + 5 | 6 | install: 7 | pip install . 8 | 9 | package: clean 10 | python setup.py sdist bdist_wheel 11 | 12 | publish: package 13 | python -m pip install twine -U 14 | python -m twine upload dist/* 15 | -------------------------------------------------------------------------------- /qbstyles/styles/qb-light.mplstyle: -------------------------------------------------------------------------------- 1 | ### FONT 2 | text.color : black 3 | 4 | ### AXES 5 | axes.facecolor : 00000007 # axes background color 6 | axes.edgecolor : 0000003D # axes edge color 7 | axes.labelcolor : 000000D9 8 | 9 | ### TICKS 10 | xtick.color : 000000D9 # color of the tick labels 11 | ytick.color : 000000D9 # color of the tick labels 12 | 13 | ### GRIDS 14 | grid.color : 000000 # grid color 15 | 16 | ### Legend 17 | legend.facecolor : FFFFFFD9 # legend background color (when 'inherit' uses axes.facecolor) 18 | legend.edgecolor : 000000D9 # legend edge color (when 'inherit' uses axes.edgecolor) 19 | 20 | ### FIGURE 21 | #figure.facecolor : 0.75 # figure facecolor; 0.75 is scalar gray 22 | figure.facecolor: FFFFFF 23 | savefig.facecolor: FFFFFF 24 | -------------------------------------------------------------------------------- /qbstyles/styles/qb-dark.mplstyle: -------------------------------------------------------------------------------- 1 | ### FONT 2 | text.color : white 3 | 4 | ### AXES 5 | axes.facecolor : FFFFFF07 # axes background color 6 | axes.edgecolor : FFFFFF3D # axes edge color 7 | axes.labelcolor : FFFFFFD9 8 | 9 | ### TICKS 10 | xtick.color : FFFFFFD9 # color of the tick labels 11 | ytick.color : FFFFFFD9 # color of the tick labels 12 | 13 | ### GRIDS 14 | grid.color : FFFFFF # grid color 15 | 16 | ### Legend 17 | legend.facecolor : inherit # legend background color (when 'inherit' uses axes.facecolor) 18 | legend.edgecolor : FFFFFFD9 # legend edge color (when 'inherit' uses axes.edgecolor) 19 | 20 | ### FIGURE 21 | #TODO: notebook ignores this 22 | figure.facecolor : 0C1C23 # figure facecolor 23 | savefig.facecolor : 0C1C23 # figure facecolor 24 | -------------------------------------------------------------------------------- /qbstyles/__init__.py: -------------------------------------------------------------------------------- 1 | # QUANTUMBLACK CONFIDENTIAL 2 | # 3 | # Copyright (c) 2016 - present QuantumBlack Visual Analytics Ltd. All 4 | # Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains the property of 7 | # QuantumBlack Visual Analytics Ltd. and its suppliers, if any. The 8 | # intellectual and technical concepts contained herein are proprietary to 9 | # QuantumBlack Visual Analytics Ltd. and its suppliers and may be covered 10 | # by UK and Foreign Patents, patents in process, and are protected by trade 11 | # secret or copyright law. Dissemination of this information or 12 | # reproduction of this material is strictly forbidden unless prior written 13 | # permission is obtained from QuantumBlack Visual Analytics Ltd. 14 | 15 | """ 16 | This module contains QB styles for common plotting libraries such as matplotlib. 17 | """ 18 | 19 | from .mpl_style import mpl_style 20 | 21 | __version__ = "0.1.4" 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Plugin-specific files: 2 | 3 | # IntelliJ 4 | .idea/ 5 | *.iml 6 | out/ 7 | 8 | ### macOS 9 | *.DS_Store 10 | .AppleDouble 11 | .LSOverride 12 | .Trashes 13 | 14 | # mpeltonen/sbt-idea plugin 15 | .idea_modules/ 16 | 17 | # JIRA plugin 18 | atlassian-ide-plugin.xml 19 | 20 | ### Python template 21 | # Byte-compiled / optimized / DLL files 22 | __pycache__/ 23 | *.py[cod] 24 | *$py.class 25 | 26 | # C extensions 27 | *.so 28 | 29 | # Distribution / packaging 30 | .Python 31 | build/ 32 | develop-eggs/ 33 | dist/ 34 | downloads/ 35 | eggs/ 36 | .eggs/ 37 | lib/ 38 | lib64/ 39 | parts/ 40 | sdist/ 41 | var/ 42 | wheels/ 43 | *.egg-info/ 44 | .installed.cfg 45 | *.egg 46 | MANIFEST 47 | 48 | # Unit test / coverage reports 49 | htmlcov/ 50 | .tox/ 51 | .coverage 52 | .coverage.* 53 | .cache 54 | nosetests.xml 55 | coverage.xml 56 | *.cover 57 | .hypothesis/ 58 | 59 | # PyBuilder 60 | target/ 61 | 62 | # Jupyter Notebook 63 | .ipynb_checkpoints 64 | 65 | # pyenv 66 | .python-version 67 | 68 | # Environments 69 | .env 70 | .venv 71 | env/ 72 | venv/ 73 | ENV/ 74 | env.bak/ 75 | venv.bak/ 76 | 77 | # mypy 78 | .mypy_cache/ 79 | 80 | # Visual Studio Code 81 | .vscode/ 82 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2018-2019 QuantumBlack Visual Analytics Limited 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 10 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 11 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND 12 | NONINFRINGEMENT. IN NO EVENT WILL THE LICENSOR OR OTHER CONTRIBUTORS 13 | BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN 14 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN 15 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | 17 | The QuantumBlack Visual Analytics Limited (“QuantumBlack”) name and logo 18 | (either separately or in combination, “QuantumBlack Trademarks”) are 19 | trademarks of QuantumBlack. The License does not grant you any right or 20 | license to the QuantumBlack Trademarks. You may not use the QuantumBlack 21 | Trademarks or any confusingly similar mark as a trademark for your product, 22 | or use the QuantumBlack Trademarks in any other manner that might cause 23 | confusion in the marketplace, including but not limited to in advertising, 24 | on websites, or on software. 25 | 26 | See the License for the specific language governing permissions and 27 | limitations under the License. 28 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # QUANTUMBLACK CONFIDENTIAL 2 | # 3 | # Copyright (c) 2016 - present QuantumBlack Visual Analytics Ltd. All 4 | # Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains the property of 7 | # QuantumBlack Visual Analytics Ltd. and its suppliers, if any. The 8 | # intellectual and technical concepts contained herein are proprietary to 9 | # QuantumBlack Visual Analytics Ltd. and its suppliers and may be covered 10 | # by UK and Foreign Patents, patents in process, and are protected by trade 11 | # secret or copyright law. Dissemination of this information or 12 | # reproduction of this material is strictly forbidden unless prior written 13 | # permission is obtained from QuantumBlack Visual Analytics Ltd. 14 | 15 | import re 16 | from os import path 17 | 18 | from setuptools import find_packages, setup 19 | 20 | name = "qbstyles" 21 | here = path.abspath(path.dirname(__file__)) 22 | 23 | # get package version 24 | with open(path.join(here, name, "__init__.py"), encoding="utf-8") as f: 25 | version = re.search('__version__ = "([^\']+?)"', f.read()).group(1) 26 | 27 | # get the dependencies and installs 28 | with open("requirements.txt", "r", encoding="utf-8") as f: 29 | requires = [x.strip() for x in f if x.strip()] 30 | 31 | # Get the long description from the README file 32 | with open(path.join(here, "README.md"), encoding="utf-8") as f: 33 | readme = f.read() 34 | 35 | setup( 36 | name=name, 37 | version=version, 38 | description="QB styles for common plotting libraries", 39 | long_description=readme, 40 | long_description_content_type='text/markdown', 41 | url="https://github.com/quantumblacklabs/qbstyles", 42 | author="QuantumBlack Labs", 43 | author_email="opensource@quantumblack.com", 44 | python_requires=">=3.5", 45 | packages=find_packages(), 46 | include_package_data=True, 47 | install_requires=requires, 48 | classifiers=[ 49 | "Programming Language :: Python :: 3", 50 | "License :: OSI Approved :: Apache Software License", 51 | "Operating System :: OS Independent", 52 | ], 53 | license="Apache 2.0", 54 | ) 55 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # QB Styles 2 | 3 | [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) 4 | [![Python Version](https://img.shields.io/pypi/pyversions/qbstyles.svg)](https://pypi.org/project/qbstyles/) 5 | [![PyPI version](https://badge.fury.io/py/qbstyles.svg)](https://pypi.org/project/qbstyles/) 6 | [![Code Style: Black](https://img.shields.io/badge/code%20style-black-black.svg)](https://github.com/ambv/black) 7 | 8 | QB Styles is a python package with a light and a dark [`matplotlib`](https://github.com/matplotlib/matplotlib) style. 9 | 10 | Dark style | Light style 11 | |-----------|----------- | 12 | | ![Line plot](https://github.com/quantumblacklabs/qbstyles/raw/master/examples/line.png?raw=true "Line plot") | ![Distribution plot](https://github.com/quantumblacklabs/qbstyles/raw/master/examples/distribution_light.png?raw=true "Distribution plot") | 13 | 14 | ## How do I install QB Styles? 15 | 16 | `qbstyles` is a Python package. To install it, simply run: 17 | 18 | 19 | ```bash 20 | pip install qbstyles 21 | ``` 22 | 23 | ## How do I use QB Styles? 24 | 25 | You can use the dark Matplotlib style theme in the following way: 26 | 27 | ```python 28 | from qbstyles import mpl_style 29 | 30 | mpl_style(dark=True) 31 | ``` 32 | 33 | And to use the light Matplotlib style theme, you can do the following: 34 | 35 | ```python 36 | from qbstyles import mpl_style 37 | 38 | mpl_style(dark=False) 39 | ``` 40 | 41 | ### How do I use QB Styles in Jupyter Notebooks? 42 | 43 | > ⚠️ Please make sure you run `from qbstyles import mpl_style` and `mpl_style()` in **different cells** as shown below. See [this issue](https://github.com/jupyter/notebook/issues/3691) for more details. 44 | 45 | ```python 46 | # first cell 47 | from qbstyles import mpl_style 48 | ``` 49 | ```python 50 | # second cell 51 | mpl_style() 52 | ``` 53 | 54 | ## What chart types can use QB Styles? 55 | 56 | - Line plots 57 | - Scatter plots 58 | - Bubble plots 59 | - Bar charts 60 | - Pie charts 61 | - Histograms and distribution plots 62 | - 3D surface plots 63 | - Stream plots 64 | - Polar plots 65 | 66 | ## Can you show me a few examples? 67 | 68 | To run the examples in [`example.ipynb`](https://github.com/quantumblacklabs/qbstyles/blob/master/example.ipynb), install the required packages using ``pip install -r requirements_notebook.txt`` in a Python virtual environment of your choice. 69 | 70 | ```python 71 | import matplotlib.pyplot as plt 72 | from qbstyles import mpl_style 73 | 74 | def plot(dark): 75 | mpl_style(dark) 76 | fig, axes = plt.subplots(2, 2, figsize=(15, 10)) 77 | 78 | # the following functions are defined in example.ipynb 79 | line_plot(axes[0, 0]) 80 | scatter_plot(axes[0, 1]) 81 | distribution_plot(axes[1, 0]) 82 | ax = plt.subplot(2, 2, 4, projection='polar') 83 | polar_plot(ax) 84 | 85 | plot(dark=True) 86 | ``` 87 | 88 | ![png](https://github.com/quantumblacklabs/qbstyles/raw/master/examples/output_6_0.png?raw=true) 89 | 90 | ```python 91 | plot(dark=False) 92 | ``` 93 | 94 | ![png](https://github.com/quantumblacklabs/qbstyles/raw/master/examples/output_7_0.png?raw=true) 95 | 96 | ## How do I create my own styles? 97 | 98 | Have a look at the files [qb-common.mplstyle](https://github.com/quantumblacklabs/qbstyles/blob/master/qbstyles/styles/qb-common.mplstyle), [qb-dark.mplstyle](https://github.com/quantumblacklabs/qbstyles/blob/master/qbstyles/styles/qb-dark.mplstyle) and [qb-light.mplstyle](https://github.com/quantumblacklabs/qbstyles/blob/master/qbstyles/styles/qb-light.mplstyle). They contain many elements that you may want to customise. 99 | 100 | To do so, create a file similar to the above files at the root of your project, and apply it after the `qbstyle` as follows: 101 | 102 | ```python 103 | import matplotlib.pyplot as plt 104 | from qbstyles import mpl_style 105 | 106 | mpl_style() 107 | plt.style.use('./your-style.mplstyle') 108 | ``` 109 | 110 | All of `matplotlibrc`'s options can be found [here](https://matplotlib.org/tutorials/introductory/customizing.html#a-sample-matplotlibrc-file). 111 | 112 | ## What licence do you use? 113 | 114 | QB Styles is licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0). 115 | -------------------------------------------------------------------------------- /qbstyles/mpl_style.py: -------------------------------------------------------------------------------- 1 | # QUANTUMBLACK CONFIDENTIAL 2 | # 3 | # Copyright (c) 2016 - present QuantumBlack Visual Analytics Ltd. All 4 | # Rights Reserved. 5 | # 6 | # NOTICE: All information contained herein is, and remains the property of 7 | # QuantumBlack Visual Analytics Ltd. and its suppliers, if any. The 8 | # intellectual and technical concepts contained herein are proprietary to 9 | # QuantumBlack Visual Analytics Ltd. and its suppliers and may be covered 10 | # by UK and Foreign Patents, patents in process, and are protected by trade 11 | # secret or copyright law. Dissemination of this information or 12 | # reproduction of this material is strictly forbidden unless prior written 13 | # permission is obtained from QuantumBlack Visual Analytics Ltd. 14 | 15 | """ 16 | This module contains the ``mpl_style`` function which applies the QB ``matplotlib`` theme 17 | 18 | Some of the tick properties cannot be set using ``plt.style.use``, 19 | so we have to set them in code. 20 | 21 | We want the user to be able to apply the full style, including styling the 22 | minor ticks, using only a _single_ function call. To make this possible we need 23 | to monkey patch as we first need to apply the style using ``plt.style.use``, 24 | then create a figure (using either ``plt.figure`` or ``plt.Figure`` or 25 | ``plt.subplots``), and _then_ get from this figure the axes to style the ticks. 26 | """ 27 | import matplotlib.pyplot as plt 28 | import matplotlib.axes 29 | from os.path import join, dirname, realpath 30 | 31 | STYLE_DIR = realpath(join(dirname(__file__), "styles")) 32 | COMMON_STYLE = "qb-common.mplstyle" 33 | DARK_STYLE = "qb-dark.mplstyle" 34 | LIGHT_STYLE = "qb-light.mplstyle" 35 | 36 | 37 | __all__ = ["mpl_style"] 38 | 39 | original_subplots = plt.subplots 40 | original_figure = plt.figure 41 | 42 | def mpl_style(dark: bool = True, minor_ticks: bool = True): 43 | """Some of the tick properties cannot be set using ``plt.style.use``. 44 | Use this function as follows, to set them together with all other style 45 | properties: 46 | 47 | :: 48 | >>> from qbstyles import mpl_style 49 | >>> import numpy as np 50 | >>> 51 | >>> #create some data 52 | >>> rng = np.random.RandomState(4) 53 | >>> x = np.linspace(0, 10, 500) 54 | >>> y = np.cumsum(rng.randn(500, 4), 0) 55 | >>> 56 | >>> # plot 57 | >>> mpl_style(dark=True) 58 | >>> plt.plot(x, y) 59 | 60 | Args: 61 | dark : Use the dark or light style (default: True) 62 | minor_ticks: Style the minor ticks (requires monkey patching)(default: True) 63 | 64 | """ 65 | plt.style.use( 66 | join(STYLE_DIR, style) 67 | for style in [COMMON_STYLE, DARK_STYLE if dark else LIGHT_STYLE] 68 | ) 69 | color = "FFFFFF" if dark else "000000" 70 | if minor_ticks: 71 | plt.subplots = _monkey_patch_subplot(color, original_subplots) 72 | plt.figure = _monkey_patch_figure(color, original_figure) 73 | else: 74 | plt.subplots = original_subplots 75 | plt.figure = original_figure 76 | 77 | 78 | def _style_ticks(axis, color): 79 | """ Enable minor ticks, and color major + minor ticks""" 80 | axis.minorticks_on() 81 | ticks = ( 82 | axis.get_xticklines() 83 | + axis.xaxis.get_minorticklines() 84 | + axis.get_yticklines() 85 | + axis.yaxis.get_minorticklines() 86 | ) 87 | 88 | for tick in ticks: 89 | tick.set_color("#" + color + "3D") 90 | 91 | 92 | def _monkey_patch_figure(color, figure): 93 | """ Style a figure's current axis tick marks, just after the figure is 94 | created. """ 95 | 96 | def _patch(*args, **kwargs): 97 | fig = figure(*args, **kwargs) 98 | _style_ticks(fig.gca(), color) 99 | return fig 100 | 101 | return _patch 102 | 103 | 104 | def _monkey_patch_subplot(color, subplot): 105 | """ Style all axes of a figure containing subplots, just after the 106 | figure is created. """ 107 | 108 | def _patch(*args, **kwargs): 109 | fig, axes = subplot(*args, **kwargs) 110 | axes_list = [axes] if isinstance(axes, matplotlib.axes.Axes) else axes 111 | for ax in axes_list: 112 | if isinstance(ax, matplotlib.axes.Axes): 113 | _style_ticks(ax, color) 114 | else: 115 | for each in ax: 116 | _style_ticks(each, color) 117 | return fig, axes 118 | 119 | return _patch 120 | -------------------------------------------------------------------------------- /qbstyles/styles/qb-common.mplstyle: -------------------------------------------------------------------------------- 1 | ### LINES 2 | # See http://matplotlib.org/api/artist_api.html#module-matplotlib.lines for more 3 | # information on line properties. 4 | lines.linewidth : 1.5 # line width in points 5 | #lines.linestyle : - # solid line 6 | #lines.color : 808080 # has no affect on plot(); see axes.prop_cycle 7 | #lines.marker : None # the default marker 8 | #lines.markeredgewidth : 0.5 # the line width around the marker symbol 9 | lines.markersize : 4 # markersize, in points 10 | #lines.dash_joinstyle : miter # miter|round|bevel 11 | #lines.dash_capstyle : butt # butt|round|projecting 12 | #lines.solid_joinstyle : miter # miter|round|bevel 13 | #lines.solid_capstyle : projecting # butt|round|projecting 14 | #lines.antialiased : True # render lines in antialiased (no jaggies) 15 | 16 | #markers.fillstyle: full # full|left|right|bottom|top|none 17 | 18 | ### PATCHES 19 | # Patches are graphical objects that fill 2D space, like polygons or 20 | # circles. See 21 | # http://matplotlib.org/api/artist_api.html#module-matplotlib.patches 22 | # information on patch properties 23 | #patch.linewidth : 1.0 # edge width in points 24 | #patch.facecolor : red 25 | #patch.edgecolor : black 26 | #patch.antialiased : True # render patches in antialiased (no jaggies) 27 | 28 | ### FONT 29 | # 30 | # font properties used by text.Text. See 31 | # http://matplotlib.org/api/font_manager_api.html for more 32 | # information on font properties. The 6 font properties used for font 33 | # matching are given below with their default values. 34 | # 35 | # The font.family property has five values: 'serif' (e.g., Times), 36 | # 'sans-serif' (e.g., Helvetica), 'cursive' (e.g., Zapf-Chancery), 37 | # 'fantasy' (e.g., Western), and 'monospace' (e.g., Courier). Each of 38 | # these font families has a default list of font names in decreasing 39 | # order of priority associated with them. When text.usetex is False, 40 | # font.family may also be one or more concrete font names. 41 | # 42 | # The font.style property has three values: normal (or roman), italic 43 | # or oblique. The oblique style will be used for italic, if it is not 44 | # present. 45 | # 46 | # The font.variant property has two values: normal or small-caps. For 47 | # TrueType fonts, which are scalable fonts, small-caps is equivalent 48 | # to using a font size of 'smaller', or about 83% of the current font 49 | # size. 50 | # 51 | # The font.weight property has effectively 13 values: normal, bold, 52 | # bolder, lighter, 100, 200, 300, ..., 900. Normal is the same as 53 | # 400, and bold is 700. bolder and lighter are relative values with 54 | # respect to the current weight. 55 | # 56 | # The font.stretch property has 11 values: ultra-condensed, 57 | # extra-condensed, condensed, semi-condensed, normal, semi-expanded, 58 | # expanded, extra-expanded, ultra-expanded, wider, and narrower. This 59 | # property is not currently implemented. 60 | # 61 | # The font.size property is the default font size for text, given in pts. 62 | # 12pt is the standard value. 63 | # 64 | font.family : sans-serif 65 | #font.style : normal 66 | #font.variant : normal 67 | #font.weight : medium 68 | #font.stretch : normal 69 | 70 | 71 | 72 | ### AXES 73 | # default face and edge color, default tick sizes, 74 | # default fontsizes for ticklabels, and so on. See 75 | # http://matplotlib.org/api/axes_api.html#module-matplotlib.axes 76 | #axes.hold : True # whether to clear the axes by default ons 77 | axes.linewidth : 1.0 # edge linewidth 78 | axes.grid : True # display grid or not 79 | axes.titlesize : 12 # fontsize of the axes title 80 | axes.titlepad : 15 # vertical offset of the axes title 81 | axes.labelsize : 12 # fontsize of the x any y labels 82 | axes.labelpad : 8.0 # space between label and axis 83 | #axes.labelweight : normal # weight of the x and y labels 84 | #axes.axisbelow : False # whether axis gridlines and ticks are below 85 | # the axes elements (lines, text, etc) 86 | axes.prop_cycle : cycler('color', ['E31A1C', '33A02C', 'FF7F00', '1F78B4', '6A3D9A', 'FB9A99', 'B2DF8A', 'FDBF6F', 'A6CEE3', 'CAB2D6']) 87 | # color cycle for plot lines 88 | # as list of string colorspecs: 89 | # single letter, long name, or 90 | # web-style hex 91 | #axes.xmargin : 0 # x margin. See `axes.Axes.margins` 92 | #axes.ymargin : 0 # y margin See `axes.Axes.margins` 93 | 94 | ### TICKS 95 | # see http://matplotlib.org/api/axis_api.html#matplotlib.axis.Tick 96 | xtick.major.size : 8.25 # major tick size in points 97 | xtick.minor.size : 4.125 # minor tick size in points 98 | xtick.major.width : 0.75 # major tick width in points 99 | xtick.minor.width : 0.75 # minor tick width in points 100 | xtick.major.pad : 5 # distance to major tick label in points 101 | xtick.minor.pad : 5 # distance to the minor tick label in points 102 | xtick.labelsize : 9 # fontsize of the tick labels 103 | #xtick.direction : in # direction: in, out, or inout 104 | 105 | ytick.major.size : 8.25 # major tick size in points 106 | ytick.minor.size : 4.125 # minor tick size in points 107 | ytick.major.width : 0.75 # major tick width in points 108 | ytick.minor.width : 0.75 # minor tick width in points 109 | ytick.major.pad : 5 # distance to major tick label in points 110 | ytick.minor.pad : 5 # distance to the minor tick label in points 111 | ytick.labelsize : 9 # fontsize of the tick labels 112 | #ytick.direction : in # direction: in, out, or inout 113 | 114 | 115 | ### GRIDS 116 | #grid.linestyle : : # dotted 117 | grid.linewidth : 0.75 # in points 118 | grid.alpha : 0.24 # transparency, between 0.0 and 1.0 119 | 120 | ### Legend 121 | legend.fancybox : False # if True, use a rounded box for the 122 | # legend, else a rectangle 123 | #legend.isaxes : True 124 | #legend.numpoints : 2 # the number of points in the legend line 125 | legend.fontsize : 9 126 | #legend.borderpad : 0.5 # border whitespace in fontsize units 127 | #legend.markerscale : 1.0 # the relative size of legend markers vs. original 128 | # the following dimensions are in axes coords 129 | #legend.labelspacing : 0.5 # the vertical space between the legend entries in fraction of fontsize 130 | #legend.handlelength : 2. # the length of the legend lines in fraction of fontsize 131 | #legend.handleheight : 0.7 # the height of the legend handle in fraction of fontsize 132 | #legend.handletextpad : 0.8 # the space between the legend line and legend text in fraction of fontsize 133 | #legend.borderaxespad : 0.5 # the border between the axes and legend edge in fraction of fontsize 134 | #legend.columnspacing : 2. # the border between the axes and legend edge in fraction of fontsize 135 | legend.shadow : False 136 | legend.frameon : True # whether or not to draw a frame around legend 137 | legend.framealpha : 0.12 # opacity of of legend frame 138 | #legend.scatterpoints : 3 # number of scatter points 139 | 140 | ### FIGURE 141 | # See http://matplotlib.org/api/figure_api.html#matplotlib.figure.Figure 142 | #figure.titlesize : medium # size of the figure title 143 | #figure.titleweight : normal # weight of the figure title 144 | #figure.figsize : 8, 6 # figure size in inches 145 | #figure.dpi : 80 # figure dots per inch 146 | 147 | #figure.edgecolor : white # figure edgecolor 148 | #figure.autolayout : False # When True, automatically adjust subplot 149 | # parameters to make the plot fit the figure 150 | #figure.max_open_warning : 20 # The maximum number of figures to open through 151 | # the pyplot interface before emitting a warning. 152 | # If less than one this feature is disabled. 153 | 154 | markers.fillstyle: full ## full|left|right|bottom|top|none 155 | 156 | 157 | #### SCATTER PLOTS 158 | #scatter.marker : o ## The default marker type for scatter plots. 159 | #scatter.alpha: 0.2 160 | 161 | # The figure subplot parameters. All dimensions are a fraction of the 162 | # figure width or height 163 | #figure.subplot.left : 0.125 # the left side of the subplots of the figure 164 | #figure.subplot.right : 0.9 # the right side of the subplots of the figure 165 | #figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure 166 | #figure.subplot.top : 0.9 # the top of the subplots of the figure 167 | #figure.subplot.wspace : 0.2 # the amount of width reserved for blank space between subplots 168 | #figure.subplot.hspace : 0.2 # the amount of height reserved for white space between subplots 169 | 170 | ### IMAGES 171 | #image.aspect : equal # equal | auto | a number 172 | #image.interpolation : bilinear # see help(imshow) for options 173 | #image.cmap : jet # gray | jet etc... 174 | #image.lut : 256 # the size of the colormap lookup table 175 | #image.origin : upper # lower | upper 176 | #image.resample : False 177 | #image.composite_image : True # When True, all the images on a set of axes are 178 | # combined into a single composite image before 179 | # saving a figure as a vector graphics file, 180 | # such as a PDF. 181 | 182 | ### CONTOUR PLOTS 183 | #contour.negative_linestyle : dashed # dashed | solid 184 | #contour.corner_mask : True # True | False | legacy 185 | 186 | ### ERRORBAR PLOTS 187 | #errorbar.capsize : 3 # length of end cap on error bars in pixels 188 | --------------------------------------------------------------------------------