I have installed matplotlib 1.5.1 on my ubuntu 14.04 system from source. The problem is whether I use qt4agg or other aggs, pyplot doesn't work when I run a python script in a terminal. It just doesn't display. But when running on jupyter notebook it works well. How can I fix the problem?