Skip to content

Instantly share code, notes, and snippets.

@anddam
Last active March 30, 2020 17:00
Show Gist options
  • Save anddam/d68c7617aab6516edc737c6ed0d082df to your computer and use it in GitHub Desktop.
Save anddam/d68c7617aab6516edc737c6ed0d082df to your computer and use it in GitHub Desktop.
Programmatically generate pandas plots
import pandas
dataframe = pandas.DataFrame({'A': [1, 2, 3, 4, 6, 5]})
ax = dataframe.plot()
ax.get_figure().savefig('memory-plot.png')
$ python3 ./mwe.py
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
(mwe.py:25608): Gdk-CRITICAL **: 18:50:05.848: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment