Skip to content

skittyaylieal/functionplotter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Math function plotter

Overview

Plots mathematical functions inputted by user. This works by evaluating a function with module py-expression, creating a function graph with Matplotlib. This function graph is displayed in a Graphical User interface * (GUI) * PySimpleGUI. Sliders allow selection of ranges to be plotted.

The plotting window

Installation

You should get a copy of the code using git clone.

git clone https://github.com/hermonochy/functionplotter.git

If git is not on your system, you may install it with sudo apt install git on linux or with brew install git on Mac OS X. If you use MS Windows, find out yourself. Hint: There is a git console for Windows.

It's recommended to use virtual environments as below to avoid headaches with Python module conflicts.

Create a virtual environment for Python:

python -m venv .

Activate virtual environment:

source ./bin/activate

Install dependencies inside virtual environment

pip3 install -r requirements.txt

Start program

python3 guiplot.py

Enter the function you want to plot into the textfield and press the plot button. Adjust area to plot with the sliders.

It is possible to plot more than one function. Separate them with a comma. The plotting window with multiple functions

Running the program again (if the virtual environment exists)

If running the program again on the same computer, the virtual environment does not need to be created and no packages need to be installed. Just go to the directory of the program, activate the virtual environment, and start the program as before. source ./bin/activate python3 guiplot.py

Future work

  • More GUI error messages.
  • 2D/3D plot
  • Widgets for fine grained definition area.
  • Saving and reloading functions.
  • Saving plot.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%