Add the rules needed to get matplotlib to work correctly.