added previous matplotlib work