<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 ipyvolume & bqplot
This example shows how the selection from a ipyvolume quiver plot can be controlled with a bqplot scatter plot and it's selection tools. We first get a small dataset from vaex
Step1:  bqplot scatter plot
And create a scatter plot with bqplot
Step2:  Ipyvolume quiver plot
And use ipyvolume to create a quiver plot
Step3:  Linking ipyvolume and bqplot
Using jslink, we link the selected properties of both widgets, and we display them next to eachother using a VBox.
Step4:  Embedding
We embed the two widgets in an html file, creating a standlone plot.
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import vaex
ds = vaex.example()
N = 2000 # for performance reasons we only do a subset
x, y, z, vx, vy, vz, Lz, E = [ds.columns[k][:N] for k in "x y z vx vy vz Lz E".split()]
Explanation: ipyvolume & bqplot
This example shows how the selection from a ipyvolume quiver plot can be controlled with a bqplot scatter plot and it's selection tools. We first get a small dataset from vaex
End of explanation
import bqplot.pyplot as plt
plt.figure(1, title="E Lz space")
scatter = plt.scatter(Lz, E,
                selected_style={'opacity': 0.2, 'size':1, 'stroke': 'red'},
                unselected_style={'opacity': 0.2, 'size':1, 'stroke': 'blue'},
                default_size=1,
               )
plt.brush_selector()
plt.show()
Explanation: bqplot scatter plot
And create a scatter plot with bqplot
End of explanation
import ipyvolume.pylab as ipv
ipv.clear()
quiver = ipv.quiver(x, y, z, vx, vy, vz, size=2, size_selected=5, color_selected="blue")
ipv.show()
Explanation: Ipyvolume quiver plot
And use ipyvolume to create a quiver plot
End of explanation
from ipywidgets import jslink, VBox
jslink((scatter, 'selected'), (quiver, 'selected'))
hbox = VBox([ipv.current.container, plt.figure(1)])
# TODO: cannot display the figure twice currently
# hbox
Explanation: Linking ipyvolume and bqplot
Using jslink, we link the selected properties of both widgets, and we display them next to eachother using a VBox.
End of explanation
import ipyvolume.embed
# if we don't do this, the bqplot will be really tiny in the standalone html 
bqplot_layout = hbox.children[1].layout
bqplot_layout.min_width = "400px"
ipyvolume.embed.embed_html("bqplot.html", hbox, offline=True, devmode=True)
%debug
!open bqplot.html
Explanation: Embedding
We embed the two widgets in an html file, creating a standlone plot.
End of explanation
<END_TASK>