Untitled
unknown
plain_text
a month ago
648 B
2
Indexable
import matplotlib.pyplot as plt # Data total_investment = 856.83 sales_so_far = 142 in_the_red = total_investment - sales_so_far # Pie chart data labels = ['Sales Recouped', 'Still in the Red'] sizes = [sales_so_far, in_the_red] explode = (0, 0.1) # Emphasize the red portion # Colors colors = ['#4CAF50', '#F44336'] # Green for recouped, red for in the red # Plot fig, ax = plt.subplots() ax.pie(sizes, explode=explode, labels=labels, colors=colors, autopct='%1.1f%%', shadow=True, startangle=140) ax.axis('equal') # Equal aspect ratio ensures that pie is drawn as a circle plt.title('Pokémon Card Investment Progress') plt.show()
Editor is loading...
Leave a Comment