I’ve a figure with 3D and 2D plots as shown below. However, whenever I add frames to it, it messes up completely. I can’t figure out what I’m doing wrong. Below’s the format of the plot grid. It says the plot on location (2, 3) is empty, which it should not. Although, I don’t know if this is the cause of the problem.
[ (1,1) scene1 ] [ (1,2) x1,y1 - ] [ (2,1) scene2 ] | (empty) [ (3,1) x2,y2 ] | |
Here is what I want. I just remove the frames and everything plots as I want, except the animation doesn’t work.
Here is what it looks like after adding the frames. Notice projections are added in 3D plots. There’re new colorbars on the right, which don’t belong to any plot. And the Y data for the second 3D plot is complete wrong. Some traces in the line plot on right are missing. Etc.
The frames are just for the three plots on the left. Here is the code for frames:
plotly_frames =  for frame in frames: frames_dict = dict(data=[dict(z=frame.final_mp_ranges, type='surface', scene='scene1', ), dict(z=frame.final_mp_errors, type='surface', scene='scene2', ), dict(x=xx.flatten(), y=yy.flatten(), type='scatter', xaxis='x2', yaxis='y2', marker=dict( size=frame.final_mp_coverages.flatten(), color=np.absolute((frame.or_mp_coverage-frame.final_mp_coverages).flatten()), ), text=get_coverage_labels(signal_map_size, frame.final_mp_coverages, frame.or_mp_coverage - frame.final_mp_coverages).flatten(), ), ], traces=range(3), name=frame.timestamp, ) plotly_frames.append(frames_dict)
Thanks for the help.