{ "info": { "author": "QuantumBlack Labs", "author_email": "opensource@quantumblack.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# QB Styles\n\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Python Version](https://img.shields.io/pypi/pyversions/qbstyles.svg)](https://pypi.org/project/qbstyles/)\n[![PyPI version](https://badge.fury.io/py/qbstyles.svg)](https://pypi.org/project/qbstyles/)\n[![Code Style: Black](https://img.shields.io/badge/code%20style-black-black.svg)](https://github.com/ambv/black)\n\nQB Styles is a python package with a light and a dark [`matplotlib`](https://github.com/matplotlib/matplotlib) style.\n\nDark style | Light style\n|-----------|----------- |\n| ![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\") |\n\n## How do I install QB Styles?\n\n`qbstyles` is a Python package. To install it, simply run:\n\n\n```bash\npip install qbstyles\n```\n\n## How do I use QB Styles?\n\nYou can use the dark Matplotlib style theme in the following way:\n\n```python\nfrom qbstyles import mpl_style\n\nmpl_style(dark=True)\n```\n\nAnd to use the light Matplotlib style theme, you can do the following: \n\n```python\nfrom qbstyles import mpl_style\n\nmpl_style(dark=False)\n```\n\n### How do I use QB Styles in Jupyter Notebooks?\n\n> \u26a0\ufe0f 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.\n\n```python\n# first cell\nfrom qbstyles import mpl_style\n```\n```python\n# second cell\nmpl_style()\n```\n\n## What chart types can use QB Styles?\n\n- Line plots\n- Scatter plots\n- Bubble plots\n- Bar charts\n- Pie charts\n- Histograms and distribution plots\n- 3D surface plots\n- Stream plots\n- Polar plots\n\n## Can you show me a few examples?\n\nTo 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.\n\n```python\nimport matplotlib.pyplot as plt\nfrom qbstyles import mpl_style\n\ndef plot(dark):\n mpl_style(dark)\n fig, axes = plt.subplots(2, 2, figsize=(15, 10))\n\n # the following functions are defined in example.ipynb \n line_plot(axes[0, 0])\n scatter_plot(axes[0, 1])\n distribution_plot(axes[1, 0])\n ax = plt.subplot(2, 2, 4, projection='polar')\n polar_plot(ax)\n\nplot(dark=True)\n```\n\n![png](https://github.com/quantumblacklabs/qbstyles/raw/master/examples/output_6_0.png?raw=true)\n\n```python\nplot(dark=False)\n```\n\n![png](https://github.com/quantumblacklabs/qbstyles/raw/master/examples/output_7_0.png?raw=true)\n\n## How do I create my own styles? \n\nHave 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.\n\nTo do so, create a file similar to the above files at the root of your project, and apply it after the `qbstyle` as follows:\n\n```python\nimport matplotlib.pyplot as plt\nfrom qbstyles import mpl_style\n\nmpl_style()\nplt.style.use('./your-style.mplstyle')\n```\n\nAll of `matplotlibrc`'s options can be found [here](https://matplotlib.org/tutorials/introductory/customizing.html#a-sample-matplotlibrc-file).\n\n## What licence do you use?\n\nQB Styles is licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/quantumblacklabs/qbstyles", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "qbstyles", "package_url": "https://pypi.org/project/qbstyles/", "platform": "", "project_url": "https://pypi.org/project/qbstyles/", "project_urls": { "Homepage": "https://github.com/quantumblacklabs/qbstyles" }, "release_url": "https://pypi.org/project/qbstyles/0.1.3/", "requires_dist": [ "matplotlib (<4.0,>=3.0.3)" ], "requires_python": ">=3.5", "summary": "QB styles for common plotting libraries", "version": "0.1.3" }, "last_serial": 5742244, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "4813e16b39273a0e0d419061cb0e579b", "sha256": "236c3e801900b7172cc3c88a8a4cb6bc4ad9bdc4d9b9133d166ac5c81fed0941" }, "downloads": -1, "filename": "qbstyles-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "4813e16b39273a0e0d419061cb0e579b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 10024, "upload_time": "2019-04-25T15:04:39", "url": "https://files.pythonhosted.org/packages/8b/5e/16b5c7d073058c18e6c2342298b73c8b38fa2449ec0d589319ac0b00cc58/qbstyles-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2e5ee00c35cac779aaeac4460609b969", "sha256": "325d1ee8df0cc0828c70c1719cfd8ad307089653892f4fec5f102ba9939ff387" }, "downloads": -1, "filename": "qbstyles-0.1.2.tar.gz", "has_sig": false, "md5_digest": "2e5ee00c35cac779aaeac4460609b969", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 7871, "upload_time": "2019-04-25T15:04:40", "url": "https://files.pythonhosted.org/packages/d1/10/295a8f4acf879b67300afb41f4be2fcf18e7bccecd4835f6c5eee7b1fa37/qbstyles-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "7784bfdfeaebc66e412b65d15a84c92a", "sha256": "cd98b4f6f119fac1bded832ca1e26f93091798735376e033af29a1a1092fc2a8" }, "downloads": -1, "filename": "qbstyles-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "7784bfdfeaebc66e412b65d15a84c92a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 10027, "upload_time": "2019-08-28T12:32:54", "url": "https://files.pythonhosted.org/packages/d2/9f/ea6a6b9a9ff803e04083ab14dbc59c280f7b29493b8e38e61b18e135ae85/qbstyles-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d5826776c76538a488f444b37d330af8", "sha256": "d623362995145085c3fc23b725b0883ab482dd29351be4595dfd285cd9d99acf" }, "downloads": -1, "filename": "qbstyles-0.1.3.tar.gz", "has_sig": false, "md5_digest": "d5826776c76538a488f444b37d330af8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 798333, "upload_time": "2019-08-28T12:32:57", "url": "https://files.pythonhosted.org/packages/0b/b2/3b8133edc7d314ac1bf64c8213d29707fc35620ec18ffb54f33b5278a40a/qbstyles-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7784bfdfeaebc66e412b65d15a84c92a", "sha256": "cd98b4f6f119fac1bded832ca1e26f93091798735376e033af29a1a1092fc2a8" }, "downloads": -1, "filename": "qbstyles-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "7784bfdfeaebc66e412b65d15a84c92a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 10027, "upload_time": "2019-08-28T12:32:54", "url": "https://files.pythonhosted.org/packages/d2/9f/ea6a6b9a9ff803e04083ab14dbc59c280f7b29493b8e38e61b18e135ae85/qbstyles-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d5826776c76538a488f444b37d330af8", "sha256": "d623362995145085c3fc23b725b0883ab482dd29351be4595dfd285cd9d99acf" }, "downloads": -1, "filename": "qbstyles-0.1.3.tar.gz", "has_sig": false, "md5_digest": "d5826776c76538a488f444b37d330af8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 798333, "upload_time": "2019-08-28T12:32:57", "url": "https://files.pythonhosted.org/packages/0b/b2/3b8133edc7d314ac1bf64c8213d29707fc35620ec18ffb54f33b5278a40a/qbstyles-0.1.3.tar.gz" } ] }