matplotlib no GUI

import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
Gifted Gull