Skip to content

Football pitch plotting library for matplotlib

License

Notifications You must be signed in to change notification settings

ElJdP/mplsoccer

 
 

Repository files navigation

mplsoccer logo

mplsoccer is a Python library for plotting soccer/football charts in Matplotlib and loading StatsBomb open-data.


Installation

Use the package manager pip to install mplsoccer.

pip install mplsoccer

Docs

Read more in the docs and see some examples in our gallery.


Quick start

Plot a StatsBomb pitch

from mplsoccer import Pitch
pitch = Pitch(pitch_color='grass', line_color='white', stripe=True)
fig, ax = pitch.draw()

alt text


What is mplsoccer?

In mplsoccer, you can:

  • plot football/soccer pitches on nine different pitch types
  • plot radar charts
  • 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 for inspiration. Please get in touch at [email protected] or @numberstorm on Twitter to find out more.


Recent changes

View the changelog for a full list of the recent changes to mplsoccer.


Inspiration

mplsoccer was inspired by:


License

MIT

About

Football pitch plotting library for matplotlib

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%