Ask Your Question
1

making background transparent on implicit_plot3d

asked 9 years ago

userX gravatar image

updated 9 years ago

slelievre gravatar image

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: myplot.save(filename=name, 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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 9 years ago

kcrisman gravatar image

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

Preview: (hide)
link

Comments

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

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

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

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

Seen: 1,210 times

Last updated: Feb 23 '16