Working with matplotlib on ubuntu machine