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='--',
),
use_latex=True,
)
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.3.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for sympy_slider-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce44b0ab0116dc21f36ebd778fdf0bfeee55d7b0dc5eecbd74f3e28672f366eb |
|
MD5 | 63256d916cc15af6361de7cbe3e0cb95 |
|
BLAKE2b-256 | 82adb669d6b2a91af40344315dbbdc0eec455ccd946c4993d9dc2a84f1d8a4a8 |