Displaying a numpy plot

asked 2015-03-09 18:44:23 -0600

Geremia gravatar image

updated 2015-03-09 18:45:42 -0600

import matplotlib
import numpy as np

import matplotlib.pyplot as plt


 
plt.figure(figsize=(6, 3))

plt.plot(x, y)
plt.show()

Why doesn't plt.show() display my plot? plt.savefig('myplot.png') works, however.

thanks

edit retag flag offensive close merge delete

Comments

This is because the hooks are not there; however, they should be in the IPython notebook (?)

kcrisman gravatar imagekcrisman ( 2015-03-09 19:01:28 -0600 )edit

Are you using SageMath on your computer (if so: command-line or notebook?) or online at cloud.sagemath.com, or other?

slelievre gravatar imageslelievre ( 2015-03-11 05:06:30 -0600 )edit

I'm using Sage with KDE Cantor on Linux.

Geremia gravatar imageGeremia ( 2015-03-11 11:46:02 -0600 )edit