andrewRowlinson / mplsoccer

Football pitch plotting library for matplotlib
MIT License
391 stars 80 forks source link

Can't use multiple pizza plots in a single figure #105

Closed hghws03 closed 4 months ago

hghws03 commented 4 months ago

When I try to use the ax parameter in make_pizza() (e.g ax=axs[2]), I always get the following message:

"AttributeError: 'Axes' object has no attribute 'set_rorigin'"

This means I can only plot a pizza plot on another figure, not on a figure with multiple axes. I can add code examples if needed, but since I've tested this multiple times, I figured it isn't required.

andrewRowlinson commented 4 months ago

This is definitely possible, I think you may be trying to plot pizza plots on a non-polar axes. See the example here for how to do this: https://github.com/andrewRowlinson/data-science/blob/master/football/multiple_pizza_plots.ipynb