CoCalc -- Collaborative Calculation in the Cloud
Sharedsupport / 2016-09-23-144035-issue60.sagewsOpen in CoCalc

Examples for support purposes...

#heading

from petsc4py import PETSc
Error in lines 1-1 Traceback (most recent call last): File "/projects/sage/sage-7.3/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 957, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> ImportError: No module named petsc4py
from sage.plot.plot3d.parametric_surface import ParametricSurface
def g(x,y): return x, y, - x**2 + y**2
def c(x,y): return sin((x-y/2)*y/4)**2
cm = colormaps.gist_rainbow
P = ParametricSurface(g, (srange(-10,10,0.1), srange(-5,5.0,0.1)), color=(c,cm))
P
3D rendering not yet implemented


show(LatexExpr("x^2"))
x^2

show(latex(x^2))
x^{2}