Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transparent shapes #1118

Open
alexberlaga opened this issue Aug 13, 2024 · 2 comments
Open

Transparent shapes #1118

alexberlaga opened this issue Aug 13, 2024 · 2 comments

Comments

@alexberlaga
Copy link

Is there a way to make an added shape have some transparency? I tried changing the color to a 4-element list, but that didn't work:

view.shape.add_sphere(zcc_point * 10, [1, 0, 1], 1)
view.shape.add_cone(point_a * 10, zcc_point * 10, [1, 0.5, 0], 10)
@hainm
Copy link
Collaborator

hainm commented Aug 15, 2024

I am wondering if opacity=0.5 will work
view.shape.add_sphere(zcc_point * 10, [1, 0, 1], 1, opacity=0.5)

I don't have access to nglview now so I am not sure.

@alexberlaga
Copy link
Author

Unfortunately, it does not: Shape._make_func.<locals>.make_func.<locals>.func() got an unexpected keyword argument 'opacity'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants