Gtk-ERROR while plotting a matrix

Hello all,

I am trying to plot the matrix representation of inferred blocks.

state = gt.minimize_blockmodel_dl(G, deg_corr=True)

e = state.get_matrix()

plt.matshow(e.todense())

However, this throws an error:

(ipython:14458): Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x
and GTK+ 3 in the same process is not supported
Trace/breakpoint trap (core dumped)

I am not sure what is happening. Any help?

Thank you
Snehal

attachment.html (980 Bytes)

GTK 2 and 3 cannot be used in the same program. GTK 3 is used by graph-tool,
and it seems you are using a matplotlib backend that pulls in GTK 2. You
need to use another backend, e.g. GTK3Cairo.