Allows users to plot functions f(x) with two user-adjustable parameters A and B. Note this program requires >= python 3.7 which should include the tkinter library which is used for the GUI.
pip3 install -U .
python3 -m basic_graph_viewer
- Choose a function from the blue dropdown menu
- Adjust parameters A, B, x lower, x upper by entering the value into the box and pressing the enter key or pressing the button to the right.
pip3 install -r dev.txt
python3 -m pytest
python3 -m pylint ./src
python3 -m black .
python3 -m mypy .
python3 -m isort .
In src/basic_graph_viewer/fx/functions.py
, add a class that inherits from Function
. Implement the following methods:
description_A
: returns a string describing Adescription_B
: returns a string describing Bdescription_fx
: returns a string describing f(x)gen_y_point
: param is an x value, returns the specified y value. Useful for piece-wise functions.
To implement time-variant systems, or to simplify, override the property y_vect
and do not implement gen_y_point
.
See src/basic_graph_viewer/fx/baseclass
for the entire Function
baseclass.
- Aliasing in periodic functions if x range is too big or frequency too high. Should update the
update_x_lower
andupdate_x_upper
to also updatex_points
, ie. the number of samples or sample frequency. - Make an example
Function
class of how to override the propertyy_vect
. - Add more tests in
tests/test_gui.py
to test gui more robustly.