single import of matplotlib outside the plotting funciton