Skip to content

Commit

Permalink
fix plots func
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannimin committed Mar 29, 2024
1 parent d6d1214 commit 2d895ac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/charts/pizza.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,4 @@ def plot_pizza_figure(self, save_fig=False):
if save_fig:
plt.savefig('outputs/fig.png', dpi=500, bbox_inches='tight')
plt.show()
return fig
12 changes: 10 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@
"""
from src.player import Player
from src.charts.pizza import Pizza
import argparse


def get_pizza_report(player_name: str):
player = Player(player_name)
Pizza(player).plot_pizza_figure(save_fig=True)


def main():
parser = argparse.ArgumentParser(description="Générer un rapport joueur")
parser.add_argument("player_name", help="Nom du joueur pour lequel générer le rapport")

args = parser.parse_args()
get_pizza_report(args.player_name)


if __name__ == '__main__':
requested = input("> player_name :")
get_pizza_report(player_name=requested)
main()

0 comments on commit 2d895ac

Please sign in to comment.