1
import matplotlib.pyplot as plt %matplotlib inline fig = plt.figure() 

I should get a pop up empty graph with no value but nothing shows up in jupyter just the output:

<Figure size 432x288 with 0 Axes> 

Why is there no graph showing up?

5
  • Why do you want an empty graph to render? Commented Nov 3, 2019 at 5:02
  • I am following it from a book where apparently it pops up and while i enter ax1, ax2 and so forth the graph updates automatically. Commented Nov 3, 2019 at 5:05
  • 2
    This wouldn't work in a Jupyter notebook - only if you run this in the Python REPL. Try doing this in the Python REPL instead and you'll see that a blank figure pops up. Commented Nov 3, 2019 at 5:21
  • in the book they say: If you are in pylab mode in IPython, a new empty window should pop up. Is there a way to change this mode? Commented Nov 3, 2019 at 5:55
  • To what exactly? Commented Nov 3, 2019 at 6:57

1 Answer 1

1

Instead of %matplotlib inline, use %matplotlib notebook to have the output display within the notebook.

import matplotlib.pyplot as plt %matplotlib notebook fig = plt.figure() 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.