bug fixed for users

This commit is contained in:
Brandon 2022-10-14 17:19:59 -04:00
parent 34d8f638a8
commit 81bc25d9c5

View file

@ -1290,7 +1290,8 @@ class ActivityLogger(commands.Cog):
save_path = str(PATH / f"plot_{ctx.message.id}.png")
table_save_path = str(PATH / f"plot_data_{ctx.message.id}.txt")
plt.bar(df.head(10).index, df.head(10)["num_messages"], width=0.5)
graph_data = df.head(10)
plt.bar(graph_data.index, graph_data["num_messages"], width=0.5)
# make graph look nice
plt.title(
@ -1299,7 +1300,7 @@ class ActivityLogger(commands.Cog):
)
plt.xlabel("user", fontsize=fontsize)
plt.ylabel("# messages", fontsize=fontsize)
plt.xticks(df.index, fontsize=fontsize)
plt.xticks(graph_data.index, fontsize=fontsize)
plt.yticks(fontsize=fontsize)
plt.grid(True)
@ -1421,7 +1422,8 @@ class ActivityLogger(commands.Cog):
save_path = str(PATH / f"plot_{ctx.message.id}.png")
table_save_path = str(PATH / f"plot_data_{ctx.message.id}.txt")
plt.bar(df.head(10).index, df.head(10)["num_messages"], width=0.5)
graph_data = df.head(10)
plt.bar(graph_data.index, graph_data["num_messages"], width=0.5)
# make graph look nice
plt.title(
@ -1430,7 +1432,7 @@ class ActivityLogger(commands.Cog):
)
plt.xlabel("user", fontsize=fontsize)
plt.ylabel("# messages", fontsize=fontsize)
plt.xticks(df.index, fontsize=fontsize)
plt.xticks(graph_data.index, fontsize=fontsize)
plt.yticks(fontsize=fontsize)
plt.grid(True)