This repository contains the Function Plotter application, which is a part of the Master Micro internship programming task.
Function Plotter is a GUI tool developed using Python and Qt5 framework (PySide2). The application allows users to plot mathematical functions on graphs generated by Matplotlib library.
Before running Function Plotter, make sure you have the following prerequisites installed:
- Visual Studio Code
- Python 3.8+
- Numpy
- Matplotlib
- PySide2
1- Open the project in Visual Studio Code
2- Open the terminal and run the following command:
python main.py
4- Enter the methametical function
5- Enter the minimum and maximum X values for the plot
6- Press on the Plot button
Before running the test suite for Function plotter, make sure that you have the following packages installed:
Then apen the project inside Visual Studio Code and run the following command inside the terminal:
pytest
The test suite cover the following:
- Empty Input Tests: Verify error messages are displayed and no graph is plotted when no input is provided.
- Valid Input Tests: Ensure correct graph is drawn, title matches function input, and toolbar icons are enabled with valid input.
- Function Input Tests: alidate error messages and absence of graph for invalid/empty function input field.
- Minimum and Maximum X Input Tests: Validate error messages and absence of graph for invalid/empty input in X value fields.
- Invalid Minimum and Maximum X Range Test: Verify error message, no graph, and disabled toolbar icons when min >= max.
Here are some screenshots illustrating different scenarios: