Skip to main content

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


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 details)

Uploaded Source

Built Distribution

sympy_slider-0.0.3-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file sympy-slider-0.0.3.tar.gz.

File metadata

  • Download URL: sympy-slider-0.0.3.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for sympy-slider-0.0.3.tar.gz
Algorithm Hash digest
SHA256 ecb834b9e268d74ee9df3398604cce59dfe2fce2826ceb0265ffba9e0e022162
MD5 9438babbfe5dd9ab690715eaa214e010
BLAKE2b-256 4d455f0aeb4ce139ad9e10c88b6293d6b530c2282885ae02ab0a9b19fd7c0cf1

See more details on using hashes here.

File details

Details for the file sympy_slider-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for sympy_slider-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ce44b0ab0116dc21f36ebd778fdf0bfeee55d7b0dc5eecbd74f3e28672f366eb
MD5 63256d916cc15af6361de7cbe3e0cb95
BLAKE2b-256 82adb669d6b2a91af40344315dbbdc0eec455ccd946c4993d9dc2a84f1d8a4a8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page