finished matplotlibgui functionality