Ask Your Question
1

plot3d giving no output, just a blank canvas

asked 2022-02-06 19:58:18 +0100

mnase gravatar image

updated 2022-02-07 08:14:10 +0100

FrédéricC gravatar image

I was trying to use SageMath to make a 3d plot. I tried some example plots from the SageMath website like:

x, y = var('x, y')
plot3d(x^2 + y^2, (-1,3),(-1,3))

Sage does open a plot in firefox, but it's just a black rectangle. I think there is some missing dependency somewhere but I have no clue on how to diagnose a problem like that.

I am on Pop OS 21.10 (an Ubuntu based distro) and had installed sage directly from the debian repositories. The version of sage is 9.2 and I am using python 3.9.7. Apt says that I am on the latest update for Sage.

edit retag flag offensive close merge delete

Comments

Welcome to Ask Sage! Thank you for your question.

slelievre gravatar imageslelievre ( 2022-02-07 00:37:36 +0100 )edit

I would try to install SageMath 9.5 from source.

slelievre gravatar imageslelievre ( 2022-02-07 00:39:44 +0100 )edit

Could you try your code with https://sagecell.sagemath.org/ to see if the error is caused by Firefox? (I can see the output of your code in my Firefox.)

tolga gravatar imagetolga ( 2022-02-08 18:35:16 +0100 )edit

@tolga thanks for the link. The code does seem to work in my firefox as well. Its most definitely the bug as stated by the answer below and I will try and build the latest version from source.

mnase gravatar imagemnase ( 2022-02-09 13:19:27 +0100 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2022-02-08 10:34:10 +0100

eric_g gravatar image

updated 2022-02-08 10:34:47 +0100

You are facing a bug in SageMath 9.2, which has been corrected since then. As pointed in @slelievre 's comments, it's recommended to install the latest stable version of SageMath (9.5) from source. This is easy on Ubuntu-based systems, simply follow these steps (this is for Ubuntu 20.04 but it should work on your system).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-02-06 19:58:18 +0100

Seen: 423 times

Last updated: Feb 08 '22