sVujke / basket-viz

MIT License
5 stars 0 forks source link

fix redundancy - shot chart #22

Open sVujke opened 3 weeks ago

sVujke commented 3 weeks ago
    plt.xlim([-800, 800])
    plt.ylim([-200, 1300]

   the court limits are being defined everywhere, and this needs to be cleaned up
sVujke commented 3 weeks ago

this could do the trick

def _setup_plot(self, ax, title=None): self.draw_court(ax) ax.set_xlim([-800, 800]) ax.set_ylim([-200, 1300]) ax.set_aspect("equal") if title: ax.set_title( title, fontsize=self.config["title"]["fontsize"], fontweight=self.config["title"]["fontweight"], color=self.config["title"]["color"], )