Minimally working code. Makes plot window, but not plots. Bindings not quite right.