Skip to content

Instantly share code, notes, and snippets.

@Zmey56
Created August 23, 2022 10:18
Show Gist options
  • Save Zmey56/189cd96b3185bd8d7fe627d6cd1e51ad to your computer and use it in GitHub Desktop.
Save Zmey56/189cd96b3185bd8d7fe627d6cd1e51ad to your computer and use it in GitHub Desktop.
x = np.arange(1, 10, 1)
y = np.random.choice(5, len(x))
sns.lineplot(x, y)
plt.title('test plot')
plot_object = io.BytesIO()
plt.savefig(plot_object)
plot_object.seek(0)
plot_object.name = 'test_plot.png'
plt.close()
bot.sendPhoto(chat_id=chat_id, photo = plot_object)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment