6

I have a script that creates png images from log data. It works fine on a production machine, but now spits errors on a new box while processing this line:

    fig, ax = plt.subplots(1,1, figsize=(20,14))


AttributeError: 'module' object has no attribute 'subplots'

I suspect issues in version differences in various modules. Any insights?

7
  • 3
    I'm assuming you've imported matplotlib as plt? Commented Apr 23, 2013 at 9:36
  • 2
    What versions of python/mpl are you running? How is plt imported in your code? Commented Apr 23, 2013 at 9:42
  • 4
    import matplotlib.pyplot as plt Commented Apr 23, 2013 at 10:02
  • IPython.__version__: '0.13.2', matplotlib.__version__: '0.99.1.1', seems the production box has a newer version of matplotlib. I will install the new version on the nex box and see if that resolves. Commented Apr 23, 2013 at 10:09
  • 1
    @nom-mon-ir, it might be best to write that as an answer to the question and mark it as accepted. (At least so that such an old question doesn't show up as an unanswered one). Commented Jul 11, 2015 at 10:00

2 Answers 2

1

Latest version of Ipython does not have this issue. Putting it as answer as suggested by @Jay Bosamiya to make this question closed.

Sign up to request clarification or add additional context in comments.

Comments

0

See the comment by nom-mon-ir:

import matplotlib.pyplot as plt

instead of import matplotlib.pyplot as plt or using a new ipython version

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.