Skip to content

Instantly share code, notes, and snippets.

@jg-you
jg-you / inline_gt_fig.py
Last active July 19, 2017 15:56
Inline graph-tool figures in jupyter-notebook
# The newest version of graph-tool plots directly in a gtk window, by default.
# The following allow you to add inline plots in a jupyter-notebook (this was previously trivial).
# [The following code must appear in a notebook, obviously]
import graph_tool as gt
import graph_tool.draw
import graph_tool.collection
import matplotlib.pyplot as plt