If you want to share an IPython notebook publicly, it's much better to
click on the "Publish" button (upper right) and share the html link it
generates. If you share the ipynb file people have to copy it to
their own project before they can look at it. I did that for you
and here is the link:
https://cloud.sagemath.com/projects/bcf4f485-52db-49db-ac8d-07e1b9b39795/files/IFS.html
It's very relevant to the correct description of why IPython displays
an image quickly and how the two worksheets are actually very
different (see below).
I don't agree...
> However, you can *also* use matplotlib directly in Sage, and
> that should be just as fast in an IPython notebook as in a Sage Math Cloud
> one. Personally, anymore I just use "raw" matplotlib in Sage for this and
> other reasons (finer control of various things, tons of examples in the
> matplotlib docs, etc.).
It won't make any difference.
The difference in this case is that in IPython notebook by default
plotting returns a *very* low-resolution base64-encoded png image,
whereas Sage worksheets return an infinite resolution vector graphics
SVG image, which is much, much more complicated. To make the Sage
version be drawn and displayed more quickly, do
show(plot(points(zip(x_pts, y_pts)), '.'), svg=False)
In most cases SVG looks much, much better than the graphics produced
by default by IPython notebook.
Note that IPython notebook embeds all plots (by default) in the
underlying JSON document of the notebook, so drawing a few plots can
make the notebook file very large. So it's important for them to
ensure the size is small. In constrast, SMC stores all images in an
external database, keyed by the sha1 hash of the content.
The image in
https://cloud.sagemath.com/projects/bcf4f485-52db-49db-ac8d-07e1b9b39795/files/IFS.sagews
doesn't appear right now because the database deleted the image a
little before the file was saved; I've made the auto-image-deletion
from the database way, way too aggressive, and am changing that in a
moment.
I played around with this worksheet when writing this:
https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-01-24-performance.sagews
William
>
> Best,
>
> Nathan
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/sage-cloud/00e68a0a-aef5-4b5d-9be2-0b07c6d87ba1%40googlegroups.com.
>
> For more options, visit
https://groups.google.com/d/optout.
--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org