Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

matplotlib x11 window

In both Ipython and Python terminals I can type in the following

import matplotlib.pyplot as plt
plt.plot([1,2,3,4])
plt.ylabel('some numbers')
plt.show()

and a nice x11 figure will pop up (example figure is shown at http://matplotlib.org/users/pyplot_tutorial.html). In sage, the plt.show() statement just does nothing. Is there any way to make this work in sage? It is kindof neat at times that sage plotting functions just dump an image file and then launches an image viewer, but I need more primitive access to matplotlib sometimes and I also need to be able to interact with the figure sometimes. Why doesn't this work in the sage terminal?

matplotlib x11 window

In both Ipython and Python terminals I can type in the following

import matplotlib.pyplot as plt
plt.plot([1,2,3,4])
plt.ylabel('some numbers')
plt.show()

and a nice x11 figure will pop up (example figure is shown at http://matplotlib.org/users/pyplot_tutorial.html). In sage, the plt.show() statement just does nothing. Is there any way to make this work in sage? It is kindof neat at times that sage plotting functions just dump an image file and then launches an image viewer, but I need more primitive access to matplotlib sometimes and I also need to be able to interact with the figure sometimes. Why doesn't this work in the sage terminal?