Pretty rendering method for mathematic functions
Project description
PyMathRender
Pretty rendering method for mathematic functions
Install
From Pypi:
py -m pip install PyMathRender
From GitHub:
py -m pip install git+https://github.com/donno2048/Maths
Use
from PyMathRender import main
main("sum([math.cos(3 ** n * x / 1000) / (3 ** n) for n in range(10)])", Text = r"$\sum_{n=0}^\infty\frac{\cos\left(3^nx\right)}{3^n}$ Is continuous but not differentiable in any point", LineColor = "blue", TextColor = "blue", start = 0, end = 10, step = .001, required = ["math"])
Or:
from PyMathRender import main
from math import cos, e, sqrt
def fun(x): return sum([cos(3 ** n * x / 1000) / (e ** (sqrt(3 ** n) - 1)) for n in range(10)])
main(fun, Text = r"$\sum_{n=0}^\infty\frac{\cos\left(3^nx\right)}{e^{-1+\sqrt{3^n}}}$ Is smooth but not analytic in any point", LineColor = "red", TextColor = "red", start = 0, end = 10, step = .001)
The first argument is the function (x
is the variable if you use the string method) - It is the only required argument,
Text
is the additional text,
LineColor
is the color of the line plotted, either blue
, green
, red
, cyan
, magenta
, yellow
, black
or white
,
TextColor
is the color of the additional text, same colors as LineColor,
start
, end
and step
are the starting and ending points and the size of the steps between them,
required
is a list of required packages for the function - needed only using the string method.
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
Built Distribution
Hashes for PyMathRender-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fada9718cbc6eb5360eccc23ad2c7b919269f207dbe3251a86e42d565b3d84b |
|
MD5 | bb948c3a024684156b81f12e523799a4 |
|
BLAKE2b-256 | 3deb9803921a3a64f77eb4308141e4abc172157a3850011e24c79f0afbb3f901 |