First time here? Check out the FAQ!

Ask Your Question
1

plot3d giving no output, just a blank canvas

asked 3 years ago

mnase gravatar image

updated 3 years ago

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.

Preview: (hide)

Comments

Welcome to Ask Sage! Thank you for your question.

slelievre gravatar imageslelievre ( 3 years ago )

I would try to install SageMath 9.5 from source.

slelievre gravatar imageslelievre ( 3 years ago )

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 ( 3 years ago )

@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 ( 3 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 3 years ago

eric_g gravatar image

updated 3 years ago

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).

Preview: (hide)
link

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: 3 years ago

Seen: 510 times

Last updated: Feb 08 '22