Skip to main content

Automatically generates sign charts for polynomial functions and rational functions.

Project description

signchart

signchart is a Python package for plotting sign charts for polynomial functions. It is designed to be simple to use to generate beautiful sign charts for polynomial functions.

Basic examples

Example 1

import signchart

f = "(x**2 + 1)**2 * (x - 1)**2 * (x + 1)"

signchart.plot(f=f, include_factors=True)
signchart.savefig(
    dirname="dirname",
    fname="fname",
)

signchart.show()

This will generate the following sign chart:

sign chart

Example 2

import signchart

f = "x**2 - x - 6"

signchart.plot(
    f=f,
    include_factors=True,
    color=True,  # Includes colored lines.
    fn_name="g(x)",  # Names the function g(x)
)

signchart.savefig(
    dirname="figures",
    fname="example_2.svg",
)

signchart.show()

This will generate the following sign chart:

sign chart

Example 3

import signchart

f = "-2 * x**2 + 2 * x + 12"

signchart.plot(
    f=f,
    include_factors=True,
    color=True,  # Includes colored lines.
    fn_name="h(x)",  # Names the function h(x)
)

signchart.savefig(
    dirname="figures",
    fname="example_3.svg",
)

signchart.show()

This will generate the following sign chart:

sign chart

Example 4

import signchart

f = "-3 * (t - 1) * (t + 3)"  # Uses 't' as variable in place of 'x'

signchart.plot(
    f=f,
    include_factors=False,  # excludes linear factors in the polynomial
    color=False,  # sign lines are black (uncolored)
    fn_name="x(t)",  # Names the function x(t)
)

signchart.savefig(
    dirname="figures",
    fname="example_4.svg",
)

signchart.show()

This will generate the following sign chart:

sign chart

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

signchart-0.2.2.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

signchart-0.2.2-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file signchart-0.2.2.tar.gz.

File metadata

  • Download URL: signchart-0.2.2.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for signchart-0.2.2.tar.gz
Algorithm Hash digest
SHA256 b0f9e380a4418f0a7bba812fef010cb8499136694fe21e020a0405c749b50522
MD5 0847330310d1b9cfb15cb07ff288536f
BLAKE2b-256 2b3567899e6034eb4e446e3947427324eba1e4899bf68a82ea045fddebafb50e

See more details on using hashes here.

File details

Details for the file signchart-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: signchart-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for signchart-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cd2b44f0ede1f7179e87fcd19139aeecd47659c3d2f645c572c5985e5d160eaf
MD5 40f19902733488e56917480376886327
BLAKE2b-256 0de13e073f80742fae86632e9ebf798f1621166e492c0d02bb026d9917953d49

See more details on using hashes here.

Supported by

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