from sympy import *
from spb import *
import panel as pn
x, y, a, b, c, d, e = symbols("x, y, a, b, c, d, e")
v = [-sin(a * y), cos(b * x)]
plot_vector(
    v, prange(x, -3*c, 3*c), prange(y, d, e),
    params={
        a: (1, -2, 2), b: (1, -2, 2),
        c: (1, 0, 2),
        (d, e): pn.widgets.RangeSlider(
            value=(-3, 3), start=-9, end=9, step=0.1)
    },
    quiver_kw=dict(color="black", scale=30, headwidth=5),
    contour_kw={"cmap": "Blues_r", "levels": 15},
    grid=False, xlabel="x", ylabel="y",
    imodule="panel", servable=True
)