Ask Your Question
1

making background transparent on implicit_plot3d

asked 2016-02-22 16:39:09 +0100

userX gravatar image

updated 2016-02-23 16:24:26 +0100

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-02-23 03:04:32 +0100

kcrisman gravatar image

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

edit flag offensive delete link more

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 ( 2016-02-24 12:57:40 +0100 )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 16:48:15 +0100 )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 18:09:03 +0100 )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

Stats

Asked: 2016-02-22 16:39:09 +0100

Seen: 1,086 times

Last updated: Feb 23 '16