again, just fit in the window please please

This commit is contained in:
Nexus 2024-03-19 00:32:20 +00:00
parent ca1d531ad6
commit c53dd91729
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -57,20 +57,19 @@ class QuoteQuota(commands.Cog):
# And now filter out any -1% counts # And now filter out any -1% counts
counts = [c for c in counts if c != -1] counts = [c for c in counts if c != -1]
fig, ax = plt.subplots() fig, ax = plt.subplots(figsize=(10, 10))
ax.pie( ax.pie(
counts, counts,
labels=usernames, labels=usernames,
autopct=pct, autopct=pct,
startangle=90, startangle=90,
radius=1.5, radius=1.5,
figsize=(10, 10)
) )
fio = io.BytesIO() fio = io.BytesIO()
plt.subplots_adjust(left=0.1, bottom=0.1, right=0.9, top=0.9) plt.subplots_adjust(left=0.1, bottom=0.1, right=0.9, top=0.9)
fig.savefig(fio, format='jpg') fig.savefig(fio, format='png')
fio.seek(0) fio.seek(0)
return discord.File(fio, filename="pie.jpeg") return discord.File(fio, filename="pie.png")
@commands.slash_command() @commands.slash_command()
async def quota( async def quota(