Cantor-SAGE: Display image

Uwe Fechner u.fechner at tudelft.nl
Tue Jun 7 20:45:06 CEST 2011


 Hello Alexander,

thank you very much for your advice.
The following code works:

from scipy import stats

import numpy as np

import matplotlib.pyplot as plt

rv = stats.norm(0, 1)

x = np.linspace(-10,10,1000)

plt.plot(x,rv.pdf(x))

plt.grid(True)

plt.savefig('plt.png')

tmpfile=tmp_filename()

cp 'plt.png' $tmpfile


But it works only in 90% of the times, if I evaluate the
worksheet again and again.

I will try to further investigate, why this solution is not
reliable.

Best regards:

Uwe Fechner

On 07.06.2011 19:52, Alexander Rieder wrote:
> tmpfile=tmp_filename(); cp plt.png $tmpfile"


-- 
----------------------------------------
Uwe Fechner, M.Sc.
Delft University of Technology
Faculty of Aerospace Engineering/ASSET
Kluyverweg 1,
2629 HS Delft, The Netherlands
Phone: +31-15-27-88902

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-edu/attachments/20110607/649f2645/attachment.htm 


More information about the kde-edu mailing list