User stats: fix creation of error image

The module name was missing.
Add matplotlib as dependency

This library is needed for the creation of user statistic images.