Ask Your Question
1

3d plot theme default? (Threejs viewer)

asked 2024-11-04 07:29:56 +0100

e gravatar image

The following command produces an interactive 3d plot viewer with the default white background.

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

But I want a black background. This functionality is available with the following command.

plot3d(x^2 + y^2, (x, -1, 1), (y, -1, 1)).show(theme="dark")

But it is cumbersome to type out .show(theme="dark") each time I wish to plot something.

Can I set the _default_ 3d plot theme? How?

I did my best to search the official docs and general web for an answer. I tried searching through the source code to find any potential answers, but I am not skilled enough.

I am using SageMath version 10.4, interactively through Linux CLI. The 3D viewer my installation defaults to is the Threejs viewer, offline version.

This is my first post. If I have done something wrong, sorry! I will do my best to rectify any mistakes I make.

Thanks in advance to anyone who can answer, even if the true answer is just "no".

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2024-11-04 21:58:35 +0100

rburing gravatar image

From the documentation of show:

from sage.plot.plot3d.base import SHOW_DEFAULTS
SHOW_DEFAULTS['theme'] = 'dark'
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-11-04 07:29:56 +0100

Seen: 35 times

Last updated: 17 hours ago