Skip to content

line-of-best-fit is utility tool for mathematicians and physicist which helps students to Plot points in a graph and automatically plots the line of best fit. Furthermore it helps to draw graphs using multiple formats of equations.

License

Notifications You must be signed in to change notification settings

sujalnegi/line-of-best-fit

Repository files navigation

line-of-best-fit

Logo

A online tool that helps students to make complex graph by just entering an equation & find the line of best fit fit


About

line-of-best-fit is utility tool for mathematicians and physicist which helps students to Plot points in a graph and automatically plots the line of best fit. Furthermore it helps to draw graphs using multiple formats of equations.

Try it here: Link


Demo

A full demo of all the functions is here

If the Site is unreachable please try to access with a VPN or through TOR Browser as the India Servers of pythonanywhere.com under mantainance.


Features

  • Plots points on graph and additionally draws the line of best fit.
  • Draws graphs for equations in following formats:
    • Linear Equation: y = mx + c
    • Complex Function Equation: f(x)
    • Implicit Equation: f(x, y) = 0
  • User Friendly Interface:
    • Plotly graphs make it more accessible for feature like: zooming, paning, scalling and more
  • Savable graphs: User can download the graph as a (.png) file

Project Structure

line-of-best-fit/
├── devlogs/             # Screenshots of all simulations and the landing page 
├── static/              # Contains the css & js files also assests
├── templates/           # HTML templates for all pages
├── .gitignore           # Git ignore file
├── app.py               # Main Flask application with all routes
├── LICENSE              # MIT License
├── README.md            # You are reading this lol
└── requirements.txt     # Python dependencies (only Flask)
sk)
 Flask)

Installation Steps

Prerequisites

  • Python 3.13+ (I used 3.13.5 but anything 3.13+ should work fine)
  • pip for installing packages
  • flask 2.0 or greator
  • Any modern browser (Chrome, Firefox, Edge the simulations use Canvas API)

Installation Steps

  1. Clone the repo:

    git clone https://github.com/sujalnegi/line-of-best-fit.git
    
    cd line-of-best-fit
  2. Create a virtual environment (recommended):

    Makes a seprate environment for the repo

    Windows:

    python -m venv venv
    ..\venv\Scripts\activate

    macOS / Linux:

    python3 -m venv venv
    
    source venv/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Run the app:

    python app.py
  5. Open it up:

    Go to http://127.0.0.1:5000 in your browser


Usage

  1. The home page has the plotting and best fit line function.
  2. Then the user can navigate through navigation bar.
  3. The graphs of function and linear equation can be made by the "Graphs" feature
  4. The graphs of [f(x, y) = 0] can be made with the "Complex Graphs" feature
  5. There is a download button for graphs through which user can download the current graph

Acknowledgement

CSS falling star background

Source: LINK


Author

Email: [email protected]

Instagram: @_sujalnegi _

Made by Sujal Negi

About

line-of-best-fit is utility tool for mathematicians and physicist which helps students to Plot points in a graph and automatically plots the line of best fit. Furthermore it helps to draw graphs using multiple formats of equations.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published