Skip to content

MRI slices tutorial #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 11, 2019
Merged

MRI slices tutorial #119

merged 3 commits into from
Sep 11, 2019

Conversation

emmanuelle
Copy link
Contributor

Doc upgrade checklist:

  • random seed is set if using random data
  • file has been moved from unconverted/x/y.md to x/y.md
  • old boilerplate at top and bottom of file has been removed
  • Every example is independently runnable and is optimized for short line count
  • no more plot() or iplot()
  • graph_objs has been renamed to graph_objects
  • fig = <something> call is high up in each example
  • minimal creation of intermediate trace objects
  • liberal use of add_trace and update_layout
  • fig.show() at the end of each example
  • [] px example at the top if appropriate
  • minimize usage of hex codes for colors in favour of those in https://github.com/plotly/plotly.py-docs/issues/14

Closes plotly/documentation#1500

The animations work now, although I haven't been able to control their behaviour as I wanted (when the slider is moved the animation always starts again from the top). I'll keep on working on it but since the online example is broken we can also merge this first and then I'll improve in another PR to come.

for k in range(nb_frames)])

# Add data to be displayed before animation starts
fig.add_trace(go.Surface(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for here, but it would be great that if frames are given and no data then the first frame data is used for data. Also, having fig.add_frames would be cool.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, add_frames would be great. Feel free to PR that into the main library if you're ever so inclined :)

@nicolaskruchten
Copy link
Contributor

Looks pretty good! I think it would be good to use a coloraxis here if possible, or to manually set cmin and cmax so the colorbar doesn't change from frame to frame.

Also, for the controls, can you try copying the ones from PX? They're configured to do play/stop/etc a bit differently and they work a bit better...

@nicolaskruchten
Copy link
Contributor

also I think it'd be nice if it would animate a bit faster ;)

@emmanuelle
Copy link
Contributor Author

discussed with @nicolaskruchten 💃

@emmanuelle emmanuelle merged commit 146bd06 into master Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken 3d animations example
2 participants