Plotly Isosurface: isovalues isn't in closed interval [isomin, isomax]

146 Views Asked by At

I'm using plotly.graph_objects.Isosurface to plot isosurfaces from my data. I noted that some isovalues of interactive plot are not in closed interval [isomin, isomax]. I wonder if it's a bug.

According to plotly official repository https://plotly.github.io/plotly.py-docs/generated/plotly.graph_objects.Isosurface.html

**isomax – Sets the maximum boundary for iso-surface plot.

isomin – Sets the minimum boundary for iso-surface plot.**

so it's unusual for isovalues to be either smaller than isomin or larger than isomax.

This problem was observed not only in my plot but also in many example plot from Plotly official page https://plotly.com/python/3d-isosurface-plots/

import plotly.graph_objects as go
import numpy as np

X, Y, Z = np.mgrid[-5:5:40j, -5:5:40j, -5:5:40j]

# ellipsoid
values = X * X * 0.5 + Y * Y + Z * Z * 2

fig = go.Figure(data=go.Isosurface(
    x=X.flatten(),
    y=Y.flatten(),
    z=Z.flatten(),
    value=values.flatten(),
    isomin=10,
    isomax=50,
    surface_count=5, # number of isosurfaces, 2 by default: only min and max
    colorbar_nticks=5, # colorbar ticks correspond to isosurface values
    caps=dict(x_show=False, y_show=False)
    ))
fig.show()

As can be seen from above example, the isomin = 10, isomax = 50, but it's easy to find an isovalue that locates outside the closed interval [10,50] from interactive plot.

isovalue's smaller than isomin isovalue's larger than isomax

Any help would be appreciated. Thank you in advance.

Goal: 3d isosurfaces plot using plotly.graph_objects.Isosurface Resulted: Some isovalues are not inside [isomin,isomax] as expected

0

There are 0 best solutions below