How Does Sage Display Graphical Output?

42 views
Skip to first unread message

kjapolson

unread,
Apr 6, 2016, 3:37:53 PM4/6/16
to sage-support
I am trying to understand how Sage is working in the background when displaying graphical output. Specifically, how does a SageCell embedded in an html website send its data to the SageCell server, and what does the SageCell do to process graphical data and provide output? I have done some extensive googling to try and figure out the answers to this question with no luck. Any information someone has on this subject is greatly appreciated! 

Andrey Novoseltsev

unread,
Apr 7, 2016, 12:52:34 AM4/7/16
to sage-support
If you want to know all details, you best option is figuring it out from the code at github, as there is no real documentation/description. You may start with
https://github.com/sagemath/sagecell/blob/master/backend_cell.py
Basically, plots are saved as files and these files are embedded into the output via HTML, so the browser loads them as usual images, there are no special communication channels etc. In "automatic" cases the plots are displayed, for manually saved ones a link is displayed below the output. The way how HTML tags are inserted into a page with embedded cells does not differ much for pictures and text. Again your best bet for all details is the source code, although you should use develop branch:
https://github.com/sagemath/sagecell/tree/develop
(I hope it will be finished and deployed in a month or so).
Reply all
Reply to author
Forward
0 new messages