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.2.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for sympy_slider-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e083b3863227f05fb48dafb1d123283e22e8667375307b69b8879154bb636b7 |
|
MD5 | f6da67278164b6f4de006b3c8ed6e56c |
|
BLAKE2b-256 | 3de1eec38b891cf4925391fb9e6b36124239e3adef1da421eb334fead272db54 |