The images below are of an pseudo animation of a 3D isograph. The only values that changes is the temperature value. The x, y, and z positions stay fixed for every frame. Is there a way to have only the temperature change between frames without needing to graph new plots?
first_timestamp = '2020-01-01 00:00:00'
recording = dataset[dataset['Timestamp'] == first_timestamp]
X = np.linspace(recording['X'].min(), recording['X'].max(), 50)
Y = np.linspace(recording['Y'].min(), recording['Y'].max(), 50)
Z = np.linspace(recording['Z'].min(), recording['Z'].max(), 20)
x, y, z = np.meshgrid(X, Y, Z)
points = np.array((recording['X'], recording['Y'], recording['Z'])).T
temps = recording['Temperature']
newdata = griddata(points, temps, (x, y, z), method='linear')
# 3D graph content settings
trace = go.Isosurface(
x=x.flatten(),
y=y.flatten(),
z=z.flatten(),
value=newdata.flatten(),
colorscale= 'Viridis',
opacity=0.6,
isomin=recording['Temperature'].min(),
isomax=recording['Temperature'].max(),
surface_count=5,
caps=dict(x_show=False, y_show=False)
)
# Create the figure dictionary
figure = {
'data': [trace],
'frames': [],# List of traces
'layout': {} # Your layout settings (if any)
}