Ask Your Question
0

Results of plot3d are not being displayed

asked 2024-12-27 08:15:43 +0100

rdfuhr gravatar image

I am just starting to explore the plotting capabilities of Sage by trying some of the examples in the tutorial. The 2D plots work great, but when I tried the first plot3d example, exactly as presented in the tutorial, I just got a blank graphics window.

That example is as follows.

x, y = var('x,y')

plot3d(x^2 + y^2, (x,-2,2), (y,-2,2))

I am running sage from the command line on an M4 iMac with macOS Sequoia 15.2 and am using the Safari browser, which launches the html viewer, which just displays a blank screen.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2024-12-27 08:28:30 +0100

rdfuhr gravatar image

updated 2024-12-28 05:45:01 +0100

I found a partial, but unsatisfactory, answer.

I tried the following

p = plot3d(x^2 + y^2, (x,-2,2), (y,-2,2)) p.show()

It still launched Safari, which displayed a blank screen.

But then I clicked the i with a circle in it on the lower right, selected "save as HTML" and then opened that HTML file using the Google Chrome browser. In that case, the surface was displayed.

But I would much prefer being able to view the surface using my default browser, which is Safari.

So is there some setting in Safari that I need to change?

Also, if I invoke sage --notebook then the results of plot3d will be displayed using Safari, but not when I invoke sage (without the --notebook).

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: 2024-12-27 08:11:11 +0100

Seen: 26 times

Last updated: Dec 28 '24