0

I am using IPython. Got confused that the codes can't execute if I don't add

%matplotlib

before

import matplotlib.pyplot as plt

Could someone enlighten me by explaining why the magic function call in IPython is needed for matplotlib usage?

1 Answer 1

3

I believe it's needed because normally matplotlib opens additional windows for graphs using a default toolkit. The %inline lets you load graphs in the IPython notebook, instead of using an external toolkit.

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

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.