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:
Example 2
import signchart
f = "x**2 - x - 6"
signchart.plot(
f=f,
include_factors=True,
color=True,
fn_name="g(x)",
)
signchart.savefig(
dirname="figures",
fname="example_2.svg",
)
signchart.show()
This will generate the following sign chart:
Example 3
import signchart
f = "-2 * x**2 + 2 * x + 12"
signchart.plot(
f=f,
include_factors=True,
color=True,
fn_name="h(x)",
)
signchart.savefig(
dirname="figures",
fname="example_3.svg",
)
signchart.show()
This will generate the following sign chart:
Example 4
import signchart
f = "-3 * (t - 1) * (t + 3)"
signchart.plot(
f=f,
include_factors=False,
color=False,
fn_name="x(t)",
)
signchart.savefig(
dirname="figures",
fname="example_4.svg",
)
signchart.show()
This will generate the following sign chart: