Skip to content

A comprehensive collection of 2D and 3D visualizations using Matplotlib and NumPy, covering trigonometric functions, parabolas, bar charts, pie charts, and scatter plots. Designed for beginner to intermediate learners to practice and master Python data visualization.

Notifications You must be signed in to change notification settings

developer-yakub/matplotlib-visualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Python Matplotlib Graphs Collection

This repository contains a collection of Python scripts demonstrating 2D and 3D graphs using Matplotlib and NumPy.
It covers trigonometric functions, parabolas, combined plots, bar graphs, pie charts, scatter plots, and 3D scatter plots.

This project is perfect for beginners learning Python plotting and data visualization, as it demonstrates different graph types, labeling, styling, and combining multiple data sets in a single visualization.


Technologies Used

  • Python 3.x
  • NumPy – For numerical operations and arrays
  • Matplotlib – For plotting graphs

Graphs Included

1. Trigonometric Functions

  • Sine Wave – Displays the basic sine function and helps visualize periodic behavior.
  • Cosine Wave – Shows the cosine function, useful for understanding phase shifts and oscillations.
  • Tangent Wave – Demonstrates tangent with its characteristic vertical asymptotes.
  • Cosecant Wave – Visualizes the reciprocal of sine, highlighting points of discontinuity.
  • Secant Wave – Visualizes the reciprocal of cosine.
  • Cotangent Wave – Shows the reciprocal of tangent with its unique periodicity.

These plots allow beginners to understand trigonometric behavior, periodicity, and function relationships visually.


2. Parabolas

  • Standard Parabola – Demonstrates quadratic relationships (y = x^2) and the characteristic U-shape.
  • Parabolas with Symbols – Highlights individual points on the curve to visualize data sampling.
  • Parabolas with Color – Adds visual emphasis for clarity or aesthetic purposes.
  • Parabolas with Symbols and Color – Combines both approaches to make the graph more informative.

These plots are ideal for visualizing quadratic functions, learning about symmetry, vertex, and axis of symmetry, and understanding how different styles can enhance clarity.


3. Combined Graphs

  • Plots multiple functions together, such as sine and cosine on the same axes.
  • Useful for comparing trends, relationships, and phase differences between functions.
  • Helps beginners understand overlaying plots, using line styles, and colors to distinguish data sets.

4. Bar Graphs

  • Illustrates categorical data, like the number of people speaking different languages.
  • Useful for comparing discrete values across categories.
  • Teaches axis labeling, graph titles, and visual clarity.

5. Pie Charts

  • Visualizes percentage distribution of a whole, such as population or proportions across categories.
  • Helps beginners understand how to represent proportions effectively.
  • Demonstrates labeling slices and showing percentages.

6. 2D Scatter Plots

  • Shows relationships between two variables with individual points.
  • Useful for identifying patterns, trends, and correlations.
  • Can plot multiple datasets in one figure to compare them visually.

7. 3D Scatter Plots

  • Extends scatter plots into three dimensions, using x, y, and z coordinates.
  • Useful for visualizing complex data distributions in three axes.
  • Demonstrates 3D plotting techniques, setting axis labels, titles, and markers.
  • Ideal for learning spatial relationships and depth perception in data visualization.

Learning Outcomes

By working with these scripts, beginners can learn:

  • Creating different types of plots using Matplotlib.
  • Labeling axes, adding titles, and customizing graph appearance.
  • Plotting multiple datasets together for comparison.
  • Using 2D and 3D visualization to understand data patterns.
  • Scaling and styling data points for clarity and presentation.

How to Use

  1. Clone the repository.
  2. Install dependencies: numpy and matplotlib.
  3. Run the scripts to explore different graph types and visualizations.
  4. Modify datasets, colors, markers, and labels to experiment further.

Author

Mohammad Yakub – Python & Data Visualization Enthusiast

About

A comprehensive collection of 2D and 3D visualizations using Matplotlib and NumPy, covering trigonometric functions, parabolas, bar charts, pie charts, and scatter plots. Designed for beginner to intermediate learners to practice and master Python data visualization.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages