Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alenaak/graph-plotter-
https://github.com/alenaak/graph-plotter-
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/alenaak/graph-plotter-
- Owner: Alenaak
- Created: 2024-08-27T16:36:41.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-27T17:09:29.000Z (4 months ago)
- Last Synced: 2024-08-27T18:50:21.385Z (4 months ago)
- Language: Python
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
- Interval Start:
-
Function 2:-x + 1
- Interval Start:
-1
- Interval End:
2
- Interval Start:
General Inputs
-
Function 1:sin(x)
- Interval Start:
-π
- Interval End:
0
- Interval Start:
-
Function 2:cos(x)
- Interval Start:
0
- Interval End:
π/2
- Interval Start:
-
Function 3:x**2
- Interval Start:
π/2
- Interval End:
π
- Interval Start:
Screenshots
Example Plot
Contributing
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - 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.