<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hello Alexander,<br>
<br>
thank you very much for your advice.<br>
The following code works:<br>
<br>
<style type="text/css">p, li { white-space: pre-wrap; }</style>
<pre style="margin: 0px; text-indent: 0px;">from scipy import stats</pre>
<pre style="margin: 0px; text-indent: 0px;">import numpy as np</pre>
<pre style="margin: 0px; text-indent: 0px;">import matplotlib.pyplot as plt</pre>
<pre style="margin: 0px; text-indent: 0px;">rv = stats.norm(0, 1)</pre>
<pre style="margin: 0px; text-indent: 0px;">x = np.linspace(-10,10,1000)</pre>
<pre style="margin: 0px; text-indent: 0px;">plt.plot(x,rv.pdf(x))</pre>
<pre style="margin: 0px; text-indent: 0px;">plt.grid(True)</pre>
<pre style="margin: 0px; text-indent: 0px;">plt.savefig('plt.png')</pre>
<pre style="margin: 0px; text-indent: 0px;">tmpfile=tmp_filename()</pre>
<pre style="margin: 0px; text-indent: 0px;">cp 'plt.png' $tmpfile</pre>
<br>
But it works only in 90% of the times, if I evaluate the<br>
worksheet again and again.<br>
<br>
I will try to further investigate, why this solution is not <br>
reliable.<br>
<br>
Best regards:<br>
<br>
Uwe Fechner<br>
<br>
On 07.06.2011 19:52, Alexander Rieder wrote:
<blockquote cite="mid:1502886.t1ljj2Taki@telicity" type="cite">
<pre wrap="">tmpfile=tmp_filename(); cp plt.png $tmpfile"</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
----------------------------------------
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</pre>
</body>
</html>