Make slider from sympy expression and params
Project description
sympy-slider
Requirements
matplotlib
numpy
sympy
Installation
pip install sympy-slider
Usage
import numpy as np
from sympy import sin, cos
from sympy.abc import a, b, x
from sympy_slider import slider
expr = a*cos(x) + b*sin(x)
params = slider(
expr,
x,
params=dict(
a=(0, -1, 1),
b=(0, -1, 1),
),
xdata=np.linspace(0, 2*np.pi, 1000),
lambdify_kws=dict(
modules='numpy',
),
plot_kws=dict(
color='blue',
linestyle='--',
),
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sympy-slider-0.0.1.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for sympy_slider-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ed8ec5a097e7324d51a55f119dd003ca9e73bcfb4fd24ee7b2c26e1a34339e2 |
|
MD5 | 9854553fbd683c88a5a5c16722ded24d |
|
BLAKE2b-256 | c8ecfc588d2944cd5b9b7f14f6b47eb25df07e9f73eb9b0c11ae7101b5eba9d3 |