This project visualises the growth of the world population between 1950 and 2010 using Matplotlib.
The chart demonstrates how simple datasets can be plotted, styled, and annotated to reveal clear population trends over time.
The script produces a dashed red line plot with circular markers (marker="o") representing population data points across selected decades.
Labels, gridlines, and a title are added for readability and presentation.
- Plotting time-series data using
plt.plot() - Applying custom styling with markers, line colours, and line types
- Enhancing interpretability through axis labels, gridlines, and titles
- Understanding how
plt.show()renders figures in an interactive window
- Python 3.x
- Matplotlib
To install Matplotlib:
pip install matplotlibA chart window will appear displaying the world population growth from 1950 to 2010, shown as a dashed red line with circular markers.
You can extend this project by:
- Replacing the hard-coded data with real UN population datasets or Kaggle CSV files
- Using NumPy arrays for faster data handling and vectorised operations
- Adding multiple lines to compare population growth between regions
- Introducing subplots for side-by-side visual comparisons
- Exporting charts to PNG or SVG formats using
plt.savefig()
-
Save the script
Save your Python file aspopulation_plot.py. -
Run the script
Open your terminal and execute:python population_plot.py
A chart window will appear displaying the world population growth from 1950 to 2010, shown as a dashed red line with circular markers.