GithubHelp home page GithubHelp logo

basic-graph-viewer's Introduction

basic-graph-viewer

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.

Installation:

pip3 install -U .

To run the graph viewer:

python3 -m basic_graph_viewer

Instructions

  1. Choose a function from the blue dropdown menu
  2. 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.

Dev Tools

Install:

pip3 install -r dev.txt

Test + coverage report:

python3 -m pytest

Linting:

python3 -m pylint ./src

Format:

python3 -m black .

mypy:

python3 -m mypy .

isort:

python3 -m isort .

Creating new Functions:

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 A
  • description_B: returns a string describing B
  • description_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.

TODO

  • Aliasing in periodic functions if x range is too big or frequency too high. Should update the update_x_lower and update_x_upper to also update x_points, ie. the number of samples or sample frequency.
  • Make an example Function class of how to override the property y_vect.
  • Add more tests in tests/test_gui.py to test gui more robustly.

basic-graph-viewer's People

Contributors

gabikim avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.