
**mplsoccer is a Python library for plotting soccer/football charts in Matplotlib
and loading StatsBomb open-data.**
---
## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install mplsoccer.
```bash
pip install mplsoccer
```
Or install via [Anaconda](https://docs.anaconda.com/free/anaconda/install/index.html).
```bash
conda install -c conda-forge mplsoccer
```
---
## Docs
Read more in the [docs](https://mplsoccer.readthedocs.io/) and see some
examples in our [gallery](https://mplsoccer.readthedocs.io/en/latest/gallery/index.html).
---
## Quick start
Plot a StatsBomb pitch
```python
from mplsoccer import Pitch
import matplotlib.pyplot as plt
pitch = Pitch(pitch_color='grass', line_color='white', stripe=True)
fig, ax = pitch.draw()
plt.show()
```

Plot a Radar
```python
from mplsoccer import Radar
import matplotlib.pyplot as plt
radar = Radar(params=['Agility', 'Speed', 'Strength'], min_range=[0, 0, 0], max_range=[10, 10, 10])
fig, ax = radar.setup_axis()
rings_inner = radar.draw_circles(ax=ax, facecolor='#ffb2b2', edgecolor='#fc5f5f')
values = [5, 3, 10]
radar_poly, rings, vertices = radar.draw_radar(values, ax=ax,
kwargs_radar={'facecolor': '#00f2c1', 'alpha': 0.6},
kwargs_rings={'facecolor': '#d80499', 'alpha': 0.6})
range_labels = radar.draw_range_labels(ax=ax)
param_labels = radar.draw_param_labels(ax=ax)
plt.show()
```

---
## What is mplsoccer?
In mplsoccer, you can:
- plot football/soccer pitches on nine different pitch types
- plot radar charts
- plot Nightingale/pizza charts
- plot bumpy charts for showing changes over time
- plot arrows, heatmaps, hexbins, scatter, and (comet) lines
- load StatsBomb data as a tidy dataframe
- standardize pitch coordinates into a single format
I hope mplsoccer helps you make insightful graphics faster,
so you don't have to build charts from scratch.
---
## Want to help?
I would love the community to get involved in mplsoccer.
Take a look at our [open-issues](https://github.com/andrewRowlinson/mplsoccer/issues)
for inspiration.
Please get in touch at rowlinsonandy@gmail.com or
[@numberstorm](https://twitter.com/numberstorm) on Twitter to find out more.
---
## Recent changes
View the [changelog](https://github.com/andrewRowlinson/mplsoccer/blob/master/CHANGELOG.md)
for a full list of the recent changes to mplsoccer.
---
## Inspiration
mplsoccer was inspired by:
- [Peter McKeever](https://petermckeever.com/) heavily inspired the API design
- [ggsoccer](https://github.com/Torvaney/ggsoccer) influenced the design and Standardizer
- [lastrow's](https://twitter.com/lastrowview) legendary animations
- [fcrstats'](https://twitter.com/FC_rstats) tutorials for using football data
- [fcpython's](https://fcpython.com/) Python tutorials for using football data
- [Karun Singh's](https://twitter.com/karun1710) expected threat (xT) visualizations
- [StatsBomb's](https://statsbomb.com/) great visual design and free open-data
- John Burn-Murdoch's [tweet](https://twitter.com/jburnmurdoch/status/1057907312030085120) got me
interested in football analytics
---
## License
[MIT](https://choosealicense.com/licenses/mit)
Raw data
{
"_id": null,
"home_page": null,
"name": "mplsoccer",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "football, matplotlib, mplsoccer, soccer, visualization",
"author": null,
"author_email": "Andrew Rowlinson <rowlinsonandy@gmail.com>, Anmol Durgapal <slothfulwave10@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/32/cd/d9f7a453ea517e21c11bb84862926048a53259c136b229d30efc1778f0b9/mplsoccer-1.5.1.tar.gz",
"platform": null,
"description": "\n\n**mplsoccer is a Python library for plotting soccer/football charts in Matplotlib \nand loading StatsBomb open-data.**\n\n---\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install mplsoccer.\n\n```bash\npip install mplsoccer\n```\n\nOr install via [Anaconda](https://docs.anaconda.com/free/anaconda/install/index.html).\n\n```bash\nconda install -c conda-forge mplsoccer\n```\n\n---\n\n## Docs\n\nRead more in the [docs](https://mplsoccer.readthedocs.io/) and see some \nexamples in our [gallery](https://mplsoccer.readthedocs.io/en/latest/gallery/index.html).\n\n---\n\n## Quick start\n\nPlot a StatsBomb pitch\n\n```python\nfrom mplsoccer import Pitch\nimport matplotlib.pyplot as plt\npitch = Pitch(pitch_color='grass', line_color='white', stripe=True)\nfig, ax = pitch.draw()\nplt.show()\n```\n\n\nPlot a Radar\n```python\nfrom mplsoccer import Radar\nimport matplotlib.pyplot as plt\nradar = Radar(params=['Agility', 'Speed', 'Strength'], min_range=[0, 0, 0], max_range=[10, 10, 10])\nfig, ax = radar.setup_axis()\nrings_inner = radar.draw_circles(ax=ax, facecolor='#ffb2b2', edgecolor='#fc5f5f')\nvalues = [5, 3, 10]\nradar_poly, rings, vertices = radar.draw_radar(values, ax=ax,\n kwargs_radar={'facecolor': '#00f2c1', 'alpha': 0.6}, \n kwargs_rings={'facecolor': '#d80499', 'alpha': 0.6})\nrange_labels = radar.draw_range_labels(ax=ax)\nparam_labels = radar.draw_param_labels(ax=ax)\nplt.show()\n```\n\n\n---\n\n## What is mplsoccer?\nIn mplsoccer, you can:\n\n- plot football/soccer pitches on nine different pitch types\n- plot radar charts\n- plot Nightingale/pizza charts\n- plot bumpy charts for showing changes over time\n- plot arrows, heatmaps, hexbins, scatter, and (comet) lines\n- load StatsBomb data as a tidy dataframe\n- standardize pitch coordinates into a single format\n\nI hope mplsoccer helps you make insightful graphics faster,\nso you don't have to build charts from scratch.\n\n---\n\n## Want to help?\nI would love the community to get involved in mplsoccer.\nTake a look at our [open-issues](https://github.com/andrewRowlinson/mplsoccer/issues) \nfor inspiration.\nPlease get in touch at rowlinsonandy@gmail.com or \n[@numberstorm](https://twitter.com/numberstorm) on Twitter to find out more.\n\n---\n\n## Recent changes\n\nView the [changelog](https://github.com/andrewRowlinson/mplsoccer/blob/master/CHANGELOG.md) \nfor a full list of the recent changes to mplsoccer.\n\n---\n\n## Inspiration\n\nmplsoccer was inspired by:\n- [Peter McKeever](https://petermckeever.com/) heavily inspired the API design\n- [ggsoccer](https://github.com/Torvaney/ggsoccer) influenced the design and Standardizer\n- [lastrow's](https://twitter.com/lastrowview) legendary animations\n- [fcrstats'](https://twitter.com/FC_rstats) tutorials for using football data\n- [fcpython's](https://fcpython.com/) Python tutorials for using football data\n- [Karun Singh's](https://twitter.com/karun1710) expected threat (xT) visualizations\n- [StatsBomb's](https://statsbomb.com/) great visual design and free open-data\n- John Burn-Murdoch's [tweet](https://twitter.com/jburnmurdoch/status/1057907312030085120) got me \ninterested in football analytics\n\n---\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit)\n",
"bugtrack_url": null,
"license": null,
"summary": "Football pitch plotting library for matplotlib",
"version": "1.5.1",
"project_urls": {
"Documentation": "https://mplsoccer.readthedocs.io",
"Issues": "https://github.com/andrewRowlinson/mplsoccer/issues",
"Source": "https://github.com/andrewRowlinson/mplsoccer"
},
"split_keywords": [
"football",
" matplotlib",
" mplsoccer",
" soccer",
" visualization"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a4210eccbbfcc666ed3830fc9c4091dd6e459cce77b65c405f40c917ad119d67",
"md5": "85560bb3c59408f68b27befb34916db7",
"sha256": "22eb78139800649e4f83b3ccce3be0a8ecd6e9eae18c2192fd176074c40570db"
},
"downloads": -1,
"filename": "mplsoccer-1.5.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "85560bb3c59408f68b27befb34916db7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 86358,
"upload_time": "2025-07-10T16:19:22",
"upload_time_iso_8601": "2025-07-10T16:19:22.677437Z",
"url": "https://files.pythonhosted.org/packages/a4/21/0eccbbfcc666ed3830fc9c4091dd6e459cce77b65c405f40c917ad119d67/mplsoccer-1.5.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "32cdd9f7a453ea517e21c11bb84862926048a53259c136b229d30efc1778f0b9",
"md5": "e12cde88d70d9d30f55dea9692a77f19",
"sha256": "1260317e08bd01984b2122e4aafddcbd468cf47d8c922eef8676cb17a6227d3f"
},
"downloads": -1,
"filename": "mplsoccer-1.5.1.tar.gz",
"has_sig": false,
"md5_digest": "e12cde88d70d9d30f55dea9692a77f19",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 1083409,
"upload_time": "2025-07-10T16:19:24",
"upload_time_iso_8601": "2025-07-10T16:19:24.686187Z",
"url": "https://files.pythonhosted.org/packages/32/cd/d9f7a453ea517e21c11bb84862926048a53259c136b229d30efc1778f0b9/mplsoccer-1.5.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-10 16:19:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "andrewRowlinson",
"github_project": "mplsoccer",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "mplsoccer"
}