Update matplotlib plot with Gtk+ button event
问题 I've encapsulated a matplotlib plot in a Gtk+ window and I'm trying to update that plot when a button is clicked (it's Gauss' circle problem). Trouble is, I'm not exactly sure how to get the plot to update with an event. So far I have the following. #! /usr/bin/env python3.4 # -*- coding: utf-8 -*- """ Main application--embed Matplotlib figure in window with UI """ import gi gi.require_version('Gtk', '3.0') import numpy as np from gi.repository import Gtk, GObject from matplotlib.figure