Made module import for plotting modular and infer backend for matplotlib dynamically.

4 jobs for plotting in 8 minutes and 34 seconds (queued for 48 seconds)