[Python] Why can't I plot 3D graphics with SageMath

Discussão em 'Python' iniciado por Stack, Agosto 13, 2025.

  1. Stack

    Stack Membro Participativo

    I do just the code in reference manual. It doesn't work. Code runs, and pop up a blank figure. It's the same in both local installation ans Cocalc, in the web.

    x, y = var('x y')

    W = plot3d(sin(pi*((x)^2 + (y)^2))/2, (x, -1, 1), (y, -1, 1),

    frame=False, color='purple', opacity=0.8)

    S = sphere((0, 0, 0), size=0.3, color='red', aspect_ratio=[1,1,1])

    show(W + S, figsize=8)


    Just another exemple:

    f(x, y) = sin(x*y)

    G = plot3d(f, (x, -2, 2), (y, -2, 2))

    G.save("graphic3d.html", viewer='threejs', online=True)

    print("Graphic saved as graphic3d.html.")


    The HTML file saved is also blank. The version is SageMath 10.6. I try to run by the shell, and JupyterLab, and is the same.

    Continue reading...

Compartilhe esta Página