This project is a Python-based mathematical visualization and student score analysis system developed using NumPy and Matplotlib.
The project demonstrates how mathematical functions and datasets can be visualized using different types of graphs and prediction models. It includes function plotting, custom equation visualization, student score analysis, and best-fit line prediction.
- Plot multiple mathematical functions in one figure
- Visualize a custom mathematical equation
- Generate scatter plots for score comparison
- Create histograms for score distribution
- Display student performance using bar charts
- Predict final scores using a best-fit regression line
- Automatically save all generated graphs as PNG files
- Python 3.x
- NumPy
- Matplotlib
- Python 3.8 or higher
- Required libraries:
pip install numpy matplotlibgit clone https://github.com/your-username/math-visualization-assignment.git
cd math-visualization-assignmentOR download ZIP and extract it.
python task8.pyAfter running the program, the following graph images will be generated automatically:
function_plot.png
own_equation.png
score_scatter.png
score_histogram.png
score_bar_chart.png
score_prediction.png
Visualizes:
- Linear function
- Quadratic function
- Sine function
- Damped cosine function
Displays a smooth custom mathematical equation using cubic and trigonometric functions.
Shows the relationship between midterm and final scores.
Displays the distribution of total student scores.
Compares total scores of all students visually.
Uses NumPy polynomial fitting to predict final scores from midterm scores.
Visualization helps us understand mathematical functions and data patterns more clearly. Graphs make relationships, trends, and comparisons easier to analyze and interpret.
The most useful graph in this assignment was the best-fit prediction graph because it demonstrates how mathematical modeling can be used for prediction and analysis.
Used for:
- Mathematical calculations
- Array handling
- Equation generation
- Linear prediction using
np.polyfit()
Used for:
- Creating graphs and plots
- Data visualization
- Styling charts with labels, legends, and grids
Refat
This project is licensed under the MIT License.


