Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only import matplotlib when needed #48

Merged
merged 1 commit into from
Dec 14, 2016
Merged

Only import matplotlib when needed #48

merged 1 commit into from
Dec 14, 2016

Commits on Dec 14, 2016

  1. Only import matplotlib when needed

    Some tests and one bit of library code were importing matplotlib
    even if plotting was not requested. This could cause needless failures
    (not to mention unwanted rebuilds of the font cache).
    
    I standardized the following:
    - Only import matplotlib when plotting is specifically requested.
    - Library code logs a warning and continues if importing matplotlib
      fails. One bit of code did that already, but printed a message
      to stderr instead of logging the message.
    - Unit tests raise an exception if importing matplotlib fails.
      This is reasonable because you have to modify a test to make it plot.
    - `import matplotlib.pyplot as plt`, as per our coding standards.
    r-owen committed Dec 14, 2016
    Configuration menu
    Copy the full SHA
    664f071 View commit details
    Browse the repository at this point in the history