Fixed matplotlib-related tests
Travis CI doesn't have X server.