andrewRowlinson / mplsoccer

Football pitch plotting library for matplotlib
MIT License
405 stars 82 forks source link

Pitch not showing up #20

Closed ybce closed 3 years ago

ybce commented 3 years ago

Hello

I'm trying to run this basic example in the docs:

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

But when I run the above nothing shows up, I tried creating a plot with matplotlib and that showed up with no issues.

I am on MacOS 10.15.6 running python 3.8.6.

Any help would be appreciated.

andrewRowlinson commented 3 years ago

Does it work if you add the following?

import matplotlib.pyplot as plt plt.show()

andrewRowlinson commented 3 years ago

I assume this is related to not using plt.show() after the plotting code. I have made this more explicit in the docs for version 1.0.0 so I am closing this issue now.