This project is a simple function plotter application built using PySide2 for the GUI and Matplotlib for plotting. The application allows users to input a mathematical function and plot its graph over a specified range.
- Input a function of
x
, e.g.,5*x^3 + 2*x
. - Specify minimum and maximum values for
x
. - Supports operators:
+
,-
,/
,*
,^
,log10()
,sqrt()
. - Input validation with user-friendly error messages.
- GUI built using PySide2.
- Plotting powered by Matplotlib.
-
Clone the repository:
git clone https://github.com/yourusername/FunctionPlotterProject.git cd FunctionPlotterProject
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
To run the application, execute the following command:
python src/main.py
- Function:
5*x^3 + 2*x + !
- Range:
0
to10
- Expected Output: Error message: "Function contains invalid characters."
- Function:
5*x^3 + 2*x -4/x + 7
- Range:
-10
to10
- Expected Output: Combined plot of Cubic and rational functions.
- Function:
2*x^4 - log10(x) + sqrt(x)
- Range:
0
to50
- Expected Output: Combined plot of square root, logarithm, and quadratic function.