"Visualizing MRI Volume Slices" in Offline Mode

Iā€™m trying to follow the ā€œVisualizing MRI Volume Slices in Pythonā€ example in offline mode, however I keep getting an empty plot. Iā€™ve copied the code from the example verbatim, however Iā€™ve omitted the line which uploads the grid:
py.grid_ops.upload(grid, ā€˜anim_slicesheadā€™+str(time.time()), auto_open=False)

And at the end, instead of:
py.icreate_animations(fig, filename=ā€˜animslicesHeadā€™+str(time.time()))
I substituted:
plotly.offline.plot(fig)

When I compile the script, a plot is opened in my web browser with a grid and a functional slider, however the graph is empty (no slices). The axes also appear to be scaled incorrectly. I tried substituting the image input data with my own numpy array to no avail.

@tpsatt The code for offline animation is a bit different. Here is an example: https://plot.ly/~empet/14887.

1 Like

@tpsatt Did you manage to do it offline?
I might need some help