slight change in surface opacity changes image completely
See original GitHub issueI need to adjust the opacity of a surface, so I can overlay two surfaces on top of each other (not sure how else to do that). But on a very small change from 1 to slightly below the look of the plot changes a lot.
opacity=1
opacity=0.99999
import numpy as np
from plotly.graph_objs import Figure, Surface
x = np.array(
[
[0, 0, 0, 0, 0, 0, 0, 0, 0],
[
7.07106781e-01,
0.5,
4.32978028e-17,
-0.5,
-7.07106781e-01,
-0.5,
-1.29893408e-16,
0.5,
7.07106781e-01,
],
[
1,
7.07106781e-01,
6.12323400e-17,
-7.07106781e-01,
-1,
-7.07106781e-01,
-1.83697020e-16,
7.07106781e-01,
1,
],
[
7.07106781e-01,
0.5,
4.32978028e-17,
-0.5,
-7.07106781e-01,
-0.5,
-1.29893408e-16,
0.5,
7.07106781e-01,
],
[
1.22464680e-16,
8.65956056e-17,
7.49879891e-33,
-8.65956056e-17,
-1.22464680e-16,
-8.65956056e-17,
-2.24963967e-32,
8.65956056e-17,
1.22464680e-16,
],
]
)
y = np.array(
[
[0, 0, 0, 0, 0, -0, -0, -0, 0],
[0, 0.5, 7.07106781e-01, 0.5, 8.65956056e-17, -0.5, -7.07106781e-01, -0.5, 0],
[
0,
7.07106781e-01,
1,
7.07106781e-01,
1.22464680e-16,
-7.07106781e-01,
-1,
-7.07106781e-01,
0,
],
[0, 0.5, 7.07106781e-01, 0.5, 8.65956056e-17, -0.5, -7.07106781e-01, -0.5, 0],
[
0,
8.65956056e-17,
1.22464680e-16,
8.65956056e-17,
1.49975978e-32,
-8.65956056e-17,
-1.22464680e-16,
-8.65956056e-17,
0,
],
]
)
z = np.array(
[
[1, 1, 1, 1, 1, 1, 1, 1, 1],
[
7.07106781e-01,
7.07106781e-01,
7.07106781e-01,
7.07106781e-01,
7.07106781e-01,
7.07106781e-01,
7.07106781e-01,
7.07106781e-01,
7.07106781e-01,
],
[
6.12323400e-17,
6.12323400e-17,
6.12323400e-17,
6.12323400e-17,
6.12323400e-17,
6.12323400e-17,
6.12323400e-17,
6.12323400e-17,
6.12323400e-17,
],
[
-7.07106781e-01,
-7.07106781e-01,
-7.07106781e-01,
-7.07106781e-01,
-7.07106781e-01,
-7.07106781e-01,
-7.07106781e-01,
-7.07106781e-01,
-7.07106781e-01,
],
[-1, -1, -1, -1, -1, -1, -1, -1, -1],
]
)
data = [Surface(x=x, y=y, z=z, surfacecolor=np.ones(x.shape), opacity=0.99999)]
fig = Figure(data=data)
fig.show()
sorry about the numbers, they’ve been generated by some external library
my actual use case is like this where there are weird lines appearing on the plot by setting opacity
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Make a picture transparent - Microsoft Support
Insert a picture in your document. On the Picture Tools Format tab, select Transparency. The Transparency menu includes seven levels of opacity to...
Read more >Changing Transparency of Images, Patches or Surfaces
This example shows how to modify transparency of images, patches and surfaces.
Read more >Add transparency effects to objects in Adobe InDesign
Add transparency effects to objects using opacity and blends, overlap objects, or knock out shapes behind objects in InDesign.
Read more >Problem with reference image - Changes to alpha does not ...
Change opacity in the data properties panel transparency subpanel. enter image description here Change from object properties to data ...
Read more >InDesign changing opacity for an unselected item
I am trying to place a slightly opaque rectangle over an image but when I select to lower the opacity on the rectangle,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This could possibly be fixed/improved by https://github.com/plotly/plotly.js/pull/4643. But at the moment I don’t see that PR being merged in near feature.
@paddyroddy could you please set the opacity to 0.25 or 0.5 and share new screenshots?