Externalize all matplotlib related functions to matplotlib_helpers.