Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alenaak/graph-plotter-


https://github.com/alenaak/graph-plotter-

Last synced: 5 days ago
JSON representation

Awesome Lists containing this project

README

        

Piecewise Function Plotter

Overview

The Piecewise Function Plotter is a Python application that uses Tkinter for its graphical user interface (GUI) and Matplotlib for plotting functions. This application allows users to input multiple piecewise functions, specify their intervals, and visualize the combined plot of these functions. The GUI includes features for dynamic input and plotting, as well as a scrollable interface to accommodate a varying number of functions.

Features



  • Dynamic Function Input: Users can specify any number of piecewise functions and their intervals.


  • Scrollable Interface: A scrollable frame allows users to input multiple functions and their intervals without space constraints.


  • Graphical Plotting: Functions are plotted using Matplotlib with support for repeating segments.


  • Function Parsing: Supports common mathematical functions and constants, including trigonometric functions, logarithms, and square roots.

Installation

To get started with this project, you'll need Python installed on your system. The application also requires some external libraries which can be installed via pip.

Clone the Repository

git clone https://github.com/Alenaak/Graph-Plotter-.git

cd piecewise-function-plotter

Install Dependencies

pip install -r requirements.txt

# requirements.txt includes:

numpy
sympy
matplotlib

Usage

Run the Application

python app.py

Using the GUI


  • Enter the number of functions you wish to input.

  • For each function, enter the function expression and its corresponding interval (start and end values).

  • Click "Set Number of Functions" to generate input fields for each function.

  • After entering the function details, click "Plot" to visualize the functions.

Example Inputs

Here are some example inputs you can use to test the application:

Intersecting Functions



  • Function 1: x - 1

    • Interval Start: -1

    • Interval End: 2




  • Function 2: -x + 1

    • Interval Start: -1

    • Interval End: 2



General Inputs



  • Function 1: sin(x)

    • Interval Start:

    • Interval End: 0




  • Function 2: cos(x)

    • Interval Start: 0

    • Interval End: π/2




  • Function 3: x**2

    • Interval Start: π/2

    • Interval End: π



Screenshots

Example Plot


Application Interface
Application Interface
Application Interface

Contributing

Contributions are welcome! If you'd like to contribute to this project, please follow these steps:


  1. Fork the repository.

  2. Create a new branch (git checkout -b feature-branch).

  3. Make your changes.

  4. Commit your changes (git commit -am 'Add new feature').

  5. Push to the branch (git push origin feature-branch).

  6. Create a new Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

If you have any questions or suggestions, feel free to open an issue or contact me directly.