Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

plot sage Graphics() from jupyter notebok in CoCalc

I want to use sage as a python library from jupyter notebok in CoCalc. I have a problem with Sage plotting:

from sage.all import *
var('x')
plot(sin(x)).show()

This code outputs "Graphics object consisting of 1 graphics primitive".

Pyplot plotting works fine. There are a number of old posts with the same problem, but all they recommend changing matplotlib backend with %matplotlib inline which does not help. Is there a way to output sage Graphics() inline without using pyplot?

plot sage Graphics() from jupyter notebok in CoCalc

I want to use sage as a python library from jupyter notebok in CoCalc. I have a problem with Sage plotting:

from sage.all import *
var('x')
plot(sin(x)).show()

This code outputs "Graphics object consisting of 1 graphics primitive".

Pyplot plotting works fine. There are a number of old posts with the same problem, but all they similar problem ( ex. https://ask.sagemath.org/question/10988/in-line-graphics-for-sage-in-ipython-notebook/), some of them recommend changing matplotlib backend with %matplotlib inline which does not help. Is there a way to output sage Graphics() inline without using pyplot? pyplot?