Open yyyxam opened 2 years ago
A go.Volume carves into a 3d grid defined on a paralelipiped to get a number of surfaces. From your long story I deduced that you want to plot the boundary of a particular 3D volume. The boundary faces can be defined as triangles and plotted as a go.Mesh3d, not as an isosurface or volume. Could you, please, post a manual plot of what you want to get via Plotly? You have 8 points, but it is unclear how are they connected to get the edges of your 3d "cuboid".
Hope it wasn't too lengthy.
I can only plot what I want to get with px.scatter3d:
It's a cell showing density fields. The data is of an unsheared cell and I manually shear the coordinates. The sheared data can not be used to plot isosurfaces/volumes. Only plottable as dots via scatter_3d
The unsheared data works for a volume-plot:
It's >8000 coordinates, which is why I wanted to simplify by using my testdata.
To answer your question: No edges are defined explicitly. Only by the order of coordinates
What was the role of the eight points in the previous post? From given data (eight points and vals, constant, and equal to 1) it's obvious that you cannot define a go.Volume
. As long as I don't know exactly your initial data, I cannot suggest a solution. How is defined the density on your volume, as a function or is it discretized and read from a file?
If you post the vertices of your sheared parallelipiped (cuboid) I could realize if the volume can be defined by a few isosurfaces defined as it's suggested in this discussion: https://github.com/plotly/plotly.py/issues/2635. Note that a cuboid is defined by its vertices and edges. The vertices are given as an array of shape (8, 3), and edges as tuples (i, j). (2,4), for example, is the edge connecting the vertices in the rows 2 and 4 of the array.
Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Alternatively, if it's a request for tech support, please post in our community forum. Thank you - @gvwilson
Apologies for letting this collect dust and reappearing now, but I've recently been working on the topic again and just received the notification. Also apologies for posting this here, as it is more related to plotly.js. This open issue perfectly describes the problem I was and am facing. I just wanted to leave this here for the sake of completeness, but don't expect a response.
I'm trying to use plotly in a dash app to render a cuboid, that's sheared to the y-axis.=it has a parallelogram as ground surface. It consists of individual points, each with a density value. plotly_express.scatter_3d renders the individual points correctly, but only has "2 views" when rotating it:
With both, I'm losing a lot of information on the insides of my structure. I think scatter_3d doesn't allow for
Best looking solution would be graph_objs.Volume or .isosurface, but they have an issue.
So far, the coordinates data had to be arranged to form an orthogonal cuboid, to render a volume. My test data is not the same y-sheared cuboid I want to achieve, but it illustrates the issue of both graph_objs.
Test Data: Using plotly_express.scatter_3d() for comparison, the following dataframe shows both Figures rendering the expected result:
scatter plot:
volume plot:
When removing 2 points at (0/1/2) & (1/1/2) -
scatter plot:
volume plot:
scatter_3d figure:
opacity doesn't take lists/ranges, so I can't use DF.val there.
Volume figure:
I played around with surface_count, but it doesn't seem to be causing the problem.
My 2 points being: