Ask Your Question

making background transparent on implicit_plot3d

asked 2016-02-22 09:39:09 -0500

userX gravatar image

updated 2016-02-23 09:24:26 -0500

Plots produced using implicit_plot3d have white background. To get transparent background, I tried using transparent=True in implicit_plot3d and in save, without success:

sage: x, y, z, t = var('x y z t')
sage: name='/Volumes/abcd/Users/efgh/Desktop/ijkl.png'
sage: myplot = implicit_plot3d(z - sqrt(8 - x^2 - y^2),
....:                          [x, -4, 4], [y, -4, 4], [z, -4, 4],
....:                          color='red', axes=True, transparent=True)
sage:, axes=True, transparent=True, fontsize='12')

The image I obtain has white but not transparent background:

image description

I know implicit_plot3d has an opacity option to set the opacity of the plotted surface, but how can I set the transparency of the background?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-02-22 20:04:32 -0500

kcrisman gravatar image

You have to use the opacity keyword, unfortunately. See the docs (search for 'transparent').

edit flag offensive delete link more


@kcrisman. I reworded the question to better reflect the intention of the original poster. The question is really about the (white) background, not about the plotted surface. Can the opacity keyword deal with that?

slelievre gravatar imageslelievre ( 2016-02-24 05:57:40 -0500 )edit

Yes, I noticed that. I don't believe so. I do think that the applet can do this, however; on the other hand, I can't get right-clicking to yield the menu for this...

kcrisman gravatar imagekcrisman ( 2016-02-24 09:48:15 -0500 )edit

opacity makes the whole thing transparent. The desired result is as @slelievre points out, to just get rid of the white background. Sorry I can not find anything helpful when I search "transparent" on the docs. Again, thanks for your help.

userX gravatar imageuserX ( 2016-02-25 11:09:03 -0500 )edit

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


Asked: 2016-02-22 09:39:09 -0500

Seen: 95 times

Last updated: Feb 23 '16