The plot below shows three variables from the Iris dataset.
Mouse controls: Left-click and drag to rotate; alt (Mac)- or ctrl (Windows)-click-drag or middle-click-drag to pan; scroll or shift-click-drag to zoom. Touch screen controls: one finger to rotate; two-finger scroll to pan; pinch to zoom.
Toggle, , .
You can see how the plot is constructed in the HTML source:
three_d.plotsto store if its points are currently being displayed.
toggle_species()function reads the flags, and calls either
three_d.hide_group()as needed, before calling
three_d.update_render()at the end.
hide_group()functions because it can take some time to do the rendering – here there is only one action to perform, but in general you might want to make many changes to a plot, and it's more efficient to make all of these changes and then only re-render once.
Posted 2016-10-02, updated 2016-12-22 (v1; groups).