Cantor-SAGE: Display image
Uwe Fechner
u.fechner at tudelft.nl
Tue Jun 7 18:57:19 CEST 2011
Hello,
I want to give an example for what I want to do:
The following code displays a nice graph, if executed in the sage notebook
in the web-browser:
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')
#plt.clf()
If I execute this code in Cantor, I get the output:
[Line2D(_line2)]
Is there any way to get the diagram be displayed in the Cantor
worksheet?
Regards:
Uwe Fechner
On 07.06.2011 17:10, Uwe Fechner wrote:
> Hello,
>
> I can display diagrams, using the plot command of sage from within
> a cantor worksheet.
>
> But I did not find a way yet, to display an arbitrary image file within
> the cantor worksheet.
>
> Has anybody an idea, how to do that?
>
> Best regards:
>
> Uwe Fechner
>
> ----------------------------------------
> 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
>
> _______________________________________________
> kde-edu mailing list
> kde-edu at mail.kde.org
> https://mail.kde.org/mailman/listinfo/kde-edu
--
----------------------------------------
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/0cd5c6fc/attachment.htm
More information about the kde-edu
mailing list