Separate out testcase for matplotlib.