Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

open a plot window from sage-console

I have sage notebook working perfectly on my Mac (including plots of course). now I would like to use the sage-shell too. I use the -ipython -pylab options but when I try to draw anything, using for instance:

x=randn(1000); hist(x)

or

f = plt.figure()
plt.plot(range(10),range(10))
plt.show()

nothing happend. Nevetheless if I ask for plt.savefig('blahblah.png') I have the image on my disk...

what did I messed?

open a plot window from sage-console

I have sage notebook working perfectly on my Mac (including plots of course). now I would like to use the sage-shell too. I use the -ipython -pylab options but when I try to draw anything, using for instance:

x=randn(1000); hist(x)

or

f = plt.figure()
plt.plot(range(10),range(10))
plt.show()

nothing happend. Nevetheless if I ask for plt.savefig('blahblah.png') I have the image on my disk...

what did I messed?

very strange...

sage: f1 = lambda x:1
sage: f2 = lambda x:1-x
sage: f3 = lambda x:exp(x)
sage: f4 = lambda x:sin(2*x)
sage: f = Piecewise([[(0,1),f1],[(1,2),f2],[(2,3),f3],[(3,10),f4]])
sage: f.plot()

with the -pylab option alone works, it seems that -ipython is to blame; any idea?