Replaced matplotlib import with simply injecting variable called  into namespace as a standard variable, to avoid problems if matplotlib is not available to import