splitAxes


NamesplitAxes JSON
Version 0.9.1 PyPI version JSON
download
home_page
SummaryA split module for easily generating matplotlib figures with split x axes
upload_time2023-01-23 16:31:54
maintainer
docs_urlNone
author
requires_python>=3.8
licenseCopyright 2023 Thomas M. Boudreaux Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords graphing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Simple Split X axes for matplotlib

Use gridspec to generate nxm grids of figures where the x axis on each figure
may be an split arbitrary number of times.

The axes object presented by this package is similar (though not identical) to
the axes object presented by matplotlib. This allows for a good amount of plotting
code to be directly ported.

## Installation

### From source
 ```bash
 git clone https://github.com/tboudreaux/splitAxes.git
 cd splitAxes
 pip instal -e .
 ```
### From PyPi
 ```bash
 pip install splitAxes
 ```

## Examples
```python
from splitAxes import split_grid
import numpy as np
import matplotlib.pyplot as plt

figRows = 2
figColums = 2

# this is a matrix of size rows x colums. Each entry in the matrix is the number of splits (NOT the number of final panels, which will be 1 + the number of splits) to generate

splitMatrix=np.array([[3,1],[0,2]])

fig, axs = split_grid(figRows, figColums, splitMatrix, figsize=(15,7))

# Example Data
X = np.linspace(-10,50, 1000)
Y = np.exp(-(X-0)**2) + np.exp(-(X-10)**2) + np.exp(-(X-20)**2)

axs[0,0].set_xlim(0,45)
axs[0,0].set_ylabel("Bob")
axs[1,0].plot(X,Y, color='green')
axs[1,1].scatter([0,3,4],[5,4,2])
axs[0,1].set_xlabel("Dave", position="manual", labelpos=0.67)

axs[1,0].fill_between([0,10], 0.3, alpha=0.5, color='blue')

plt.show()
```

This should produce an output that looks something like

![Example Output](tests/ExampleOutput.png?raw=true "Example Output")

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "splitAxes",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "graphing",
    "author": "",
    "author_email": "\"Thomas M. Boudreaux\" <thomas@boudreauxmail.com>, \"Keighley E. Rockcliffe\" <keighrockcliffe@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/43/de/850c45e287131942b5d56a70a418b2f105957f54f91c05001eb3a085fa1f/splitAxes-0.9.1.tar.gz",
    "platform": null,
    "description": "# Simple Split X axes for matplotlib\n\nUse gridspec to generate nxm grids of figures where the x axis on each figure\nmay be an split arbitrary number of times.\n\nThe axes object presented by this package is similar (though not identical) to\nthe axes object presented by matplotlib. This allows for a good amount of plotting\ncode to be directly ported.\n\n## Installation\n\n### From source\n ```bash\n git clone https://github.com/tboudreaux/splitAxes.git\n cd splitAxes\n pip instal -e .\n ```\n### From PyPi\n ```bash\n pip install splitAxes\n ```\n\n## Examples\n```python\nfrom splitAxes import split_grid\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfigRows = 2\nfigColums = 2\n\n# this is a matrix of size rows x colums. Each entry in the matrix is the number of splits (NOT the number of final panels, which will be 1 + the number of splits) to generate\n\nsplitMatrix=np.array([[3,1],[0,2]])\n\nfig, axs = split_grid(figRows, figColums, splitMatrix, figsize=(15,7))\n\n# Example Data\nX = np.linspace(-10,50, 1000)\nY = np.exp(-(X-0)**2) + np.exp(-(X-10)**2) + np.exp(-(X-20)**2)\n\naxs[0,0].set_xlim(0,45)\naxs[0,0].set_ylabel(\"Bob\")\naxs[1,0].plot(X,Y, color='green')\naxs[1,1].scatter([0,3,4],[5,4,2])\naxs[0,1].set_xlabel(\"Dave\", position=\"manual\", labelpos=0.67)\n\naxs[1,0].fill_between([0,10], 0.3, alpha=0.5, color='blue')\n\nplt.show()\n```\n\nThis should produce an output that looks something like\n\n![Example Output](tests/ExampleOutput.png?raw=true \"Example Output\")\n",
    "bugtrack_url": null,
    "license": "Copyright 2023 Thomas M. Boudreaux  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A split module for easily generating matplotlib figures with split x axes",
    "version": "0.9.1",
    "split_keywords": [
        "graphing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a64d357d48e522e289e9bcb38bc3f2c13ffcc87404f108908068bf7d376178e1",
                "md5": "2130230bbd8ed8942d055550e7e32196",
                "sha256": "0d53e96bc4e912f2d7f5004b67b74c59f0595b03a4994b6806ccce9be2127ed6"
            },
            "downloads": -1,
            "filename": "splitAxes-0.9.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2130230bbd8ed8942d055550e7e32196",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 15093,
            "upload_time": "2023-01-23T16:31:50",
            "upload_time_iso_8601": "2023-01-23T16:31:50.878152Z",
            "url": "https://files.pythonhosted.org/packages/a6/4d/357d48e522e289e9bcb38bc3f2c13ffcc87404f108908068bf7d376178e1/splitAxes-0.9.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "43de850c45e287131942b5d56a70a418b2f105957f54f91c05001eb3a085fa1f",
                "md5": "83f3b4f5e0ff2bb57c282965157e3731",
                "sha256": "bae9555d39f6d9a66ffbbfe961fd6b67d28bd471a41aebc3e7d5d5fdad527bd5"
            },
            "downloads": -1,
            "filename": "splitAxes-0.9.1.tar.gz",
            "has_sig": false,
            "md5_digest": "83f3b4f5e0ff2bb57c282965157e3731",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 71458,
            "upload_time": "2023-01-23T16:31:54",
            "upload_time_iso_8601": "2023-01-23T16:31:54.607018Z",
            "url": "https://files.pythonhosted.org/packages/43/de/850c45e287131942b5d56a70a418b2f105957f54f91c05001eb3a085fa1f/splitAxes-0.9.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-23 16:31:54",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "splitaxes"
}
        
Elapsed time: 0.03811s