Question
Write a data visualization script using Matplotlib to build a single Figure containing two side-byside subplot Axes grids: • Subplot 1: A line chart representing trend progression values over a timeline. • Subplot 2: A scatter plot diagram highlighting coordinate cluster spaces. Note: Add clear axis titles, customised colour mappings, legends, and bounding grid markers across the visual plots
Answer :
Word Count : 1108
Matplotlib is a widely used Python library for creating static, interactive, and animated data visualizations. It provides flexible tools for representing numerical data through line charts, scatter plots, bar charts, histograms, and many other graphical forms. The following script creates a single Figure containing two side-by-side subplot Axes. The first subplot uses a line chart to represent the progression of values over a timeline, while the second subplot uses a scatter plot to display coordinate cluster spaces. Customized colour mappings, legends, axis titles, grid markers, and other visual properties are included to make the visualization clear and informative. ```python import matplotlib.pyplot as plt import numpy as np # --------------------------------------------------------- # Data for Subplot 1: Trend progression over a timeline # --------------------------------------------------------- timeline = np.array([ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct" ]) trend_values = np.array([ 25, 31, 29, 38, 45, 50, 57, 55, 65, 72 ]) # --------------------------------------------------------- # Data for Subplot 2: Coordinate clusters # --------------------------------------------------------- cluster_1_x = np.array([1, 2, 2.5, 3, 3.5, 4]) cluster_1_y = np.array([1, 1.5, 2, 2.2, 2.8, 3]) cluster_2_x = np.array([6, 6.5, 7, 7.5, 8, 8.5]) cluster_2_y = np.array([6, 6.8, 7.2, 7.5, 8.2, 9]) cluster_3_x = np.array([3, 3.5, 4, 4.5, 5, 5.5]) cluster_3_y = np.array([7, 7.5, 8, 8.5, 8.2, 9]) # --------------------------------------------------------- # Create one Figure with two side-by-side Axes # --------------------------------------------------------- fig, axes = plt.subplots( 1, 2, figsize=(14, 6) ) # --------------------------------------------------------- # Subplot 1: Line Chart # --------------------------------------------------------- ax1 = axes[0] ax1.plot( timeline, trend_values, marker="o", linestyle="-", linewidth=2.5, markersize=7, color="royalblue", label="Trend Progression" ) # Add data labels for i, value in enumerate(trend_values): ax1.text( i, value + 1.5, str(value), ha="center", fontsize=9 ) ax1.set_title( "Trend Progression Over Time", fontsize=14, fontweight="bold" ___ ____ ___ _____ __________ _____ _______ __________ _______ ___.
__________ ____ _______ __________ _______ _______ ________ _______ ____ __________ _____.
______ ___ __________ _________ ________ _________ _______ _______.
__________ _____ _________ ____ _____ ______ ______ ____.
_______ ______ __________ __________ _______.
____ _________ _____ _________ ___ __________ _________ _____ ____ __________.
____ ____ ________ ______ ________ _____.
________ _____ _________ ________ __________ _____ _______ _____ ______ ____ __________.
_________ ____ _________ ____ ___ ___ _______ ______ __________ _______ _________ ____.
________ ______ _______ ____ __________ _____ ______ ___ _____ ______ __________.
______ ____ ____ _________ _______ ____ __________ ______ ____ ____ __________ _________.
_________ ________ _______ ________ ________ _____ _____ ___.
___ ____ ___ _________ ____ _______ ___ __________ ___ _________.
__________ _____ ____ __________ _______ _________ ________ _______ ________ ______ _______.
_____ ____ _________ _____ ________ ___ ________ _______ ___.
__________ __________ ________ ____ ________ __________ ____ _____.
__________ _________ ________ ___ ______ ___ __________ ________ _________ _________ _________ _____.
_________ _______ ___ _____ ___ ____ ________ ___ ____ ________ ___ _______.
_____ ____ _____ __________ _____ ____ ___ __________.
___ __________ _________ _________ ___ _________ _______ _______ ____ __________ ________.
___ ________ _______ ______ ______.
____ _____ _____ ___ __________ __________ ________ ________ ____.
_____ __________ ________ __________ _______ __________ _________ _________ _____ ________ _______.
_________ ______ ___ ___ ___ ______ __________ __________.
____ ___ ________ __________ _______.
___ _______ ________ ____ __________ ________ _________ ___ _________ _________ ____.
________ _________ _______ _______ _____.
_________ ______ __________ __________ ______ ______ ______ ____ _____ ____.
________ ______ ________ _______ _______ __________ ________ ______.
_________ ______ _______ ____ _____ _______ _________.
_____ ___ _______ _________ _______ ____ _________ _________ ______ ________.
__________ ____ ________ __________ __________ ___ ___ _______ _____.
_______ ___ ________ __________ __________ ___.
___ ______ _______ _______ _____ _________ ________ ___.
____ _________ _____ ___ ____ ______ ____ ____ _____ ________ ___.
________ ________ _________ __________ _______ _____ _________ __________ ____ ________ _______ ________.
_________ _________ _________ ______ ______ _________.
_____ ________ _________ _____ __________ _____ ________ _________.
_____ _______ ___ ________ ____ ___ _____ ___ _____ _____ _________.
__________ ____ ____ ___ ___ __________.
_________ _________ ______ _________ __________ ___ ______ __________ __________.
____ _______ __________ __________ ____ ________ ______ _________ _____ ______ ___ ____.
_____ ______ _____ ______ _______ _________ ____ ____.
____ ______ ____ ____ __________ ________ _____ ________ __________ ________.
____ _______ _______ ___ ______ _____ __________.
__________ _______ _______ __________ __________ __________ ___ ____ _________ _____.
_______ ___ __________ ___ ___ ___ ___ ____ ______ __________ ________ __________.
______ ______ ___ ________ _____ ________ __________ __________.
________ ____ ________ ________ _________ ___ _____ _____ ______.
_____ __________ ______ __________ ____ _______ _________ ________ _____ __________ ____.
_________ ____ ____ ___ ______ _______ ________ _____ ________.
__________ ___ ______ __________ ___.
_________ ________ ____ _____ _______ ___ _____ ___ ________ _______ _____ ______.
________ ________ ____ _________ _______ _____ _______ ____ _______ _______ ________ _____.
___ ________ __________ _____ _________ ____ ____ ____ _________.
________ ______ _______ _________ _________ ________ ____ ______ ______ __________ ________.
_____ ___ ______ ______ _______.
____ ______ _________ ____ _________ ________ __________ _________.
_________ ________ _________ ________ ____ ____ _____ _________ __________ _______ ________ ________.
______ _____ ____ ________ __________ ___ __________ ____ __________ _____ ___.
_____ _____ ___ ___ _______ ________.
___ _________ ________ _________ ___.
___ _____ _____ __________ ________ ________ _________ _____.
_________ ___ _________ ________ ________.
____ ___ ___ _______ ____ _____ ______ ______ ______ _____ _________.
______ _________ ___ ___ ________ ________.
______ ______ _________ _______ ______ ____ __________.
________ __________ ______ _________ _________.
__________ ____ _____ ________ __________ _____ ___.
________ _____ ___ _______ ____ ______.
_______ _______ _______ ___ _______ _________ _________ _________ _______.
______ _________ ______ _____ _________.
________ ____ ____ ____ _____ _______ _____.
_____ _________ ________ ___ ___ ___ _______ ___ _______.
_______ ____ ________ ___ _______ _____ _______ __________ __________ ____.
__________ ________ _______ _________ _________ ____ ____ _______ ____ _________ ____.
___ _________ ___ __________ _________ __________ ___ __________ ________ _____ _________.
_______ _____ __________ __________ _______ _____ _______ _________ _____ _____ __________.
_________ _________ _____ ____ _____ _____ _________ _______ ____ ___.
____ ______ _______ _________ __________ ____ __________ ___ __________ _____.
________ _______ ___ ________ _____ ____ __________ ___ _______.
____ __________ __________ ______ _______ ____ _______ __________.
_________ _____ _____ ________ ________.
______ ________ ___ _____ ____.
________ ________ ___ ________ __________ _________ _________ _____ __________ ______ ___ _______.
____ __________ _________ _______ _________ _______ ______.
_________ ______ _______ _________ _____ ____ _____ _______.
_____ ________ _____ _____ ___ ____.
______ _________ ________ _________ _____ ____ ________ ________.
_______ ___ ___ _____ __________ _________ ___ ___.
________ ________ _______ ________ _________ __________ _________ _____.
________ _________ _________ ____ _______ _________ __________ __________ ______ _____ _____ _______.
__________ ________ _______ _____ _____.
____ ________ ______ ____ _________ ________ ____ ______.
____ ____ ___ _____ ___ _____ ____ ___ _____ _______ ________.
________ ____ ______.
Get Full Answer on WhatsApp
Matplotlib is a widely used Python library for creating static, interactive, and animated data visualizations. It provides flexible tools for representing numerical data through line charts, scatter plots, bar charts, histograms, and many other graphical forms. The following script creates a single Figure containing two side-by-side subplot Axes. The first subplot uses a line chart to represent the progression of values over a timeline, while the second subplot uses a scatter plot to display coordinate cluster spaces. Customized colour mappings, legends, axis titles, grid markers, and other visual properties are included to make the visualization clear and informative. ```python import matplotlib.pyplot as plt import numpy as np # --------------------------------------------------------- # Data for Subplot 1: Trend progression over a timeline # --------------------------------------------------------- timeline = np.array([ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct" ]) trend_values = np.array([ 25, 31, 29, 38, 45, 50, 57, 55, 65, 72 ]) # --------------------------------------------------------- # Data for Subplot 2: Coordinate clusters # --------------------------------------------------------- cluster_1_x = np.array([1, 2, 2.5, 3, 3.5, 4]) cluster_1_y = np.array([1, 1.5, 2, 2.2, 2.8, 3]) cluster_2_x = np.array([6, 6.5, 7, 7.5, 8, 8.5]) cluster_2_y = np.array([6, 6.8, 7.2, 7.5, 8.2, 9]) cluster_3_x = np.array([3, 3.5, 4, 4.5, 5, 5.5]) cluster_3_y = np.array([7, 7.5, 8, 8.5, 8.2, 9]) # --------------------------------------------------------- # Create one Figure with two side-by-side Axes # --------------------------------------------------------- fig, axes = plt.subplots( 1, 2, figsize=(14, 6) ) # --------------------------------------------------------- # Subplot 1: Line Chart # --------------------------------------------------------- ax1 = axes[0] ax1.plot( timeline, trend_values, marker="o", linestyle="-", linewidth=2.5, markersize=7, color="royalblue", label="Trend Progression" ) # Add data labels for i, value in enumerate(trend_values): ax1.text( i, value + 1.5, str(value), ha="center", fontsize=9 ) ax1.set_title( "Trend Progression Over Time", fontsize=14, fontweight="bold" ___ ____ ___ _____ __________ _____ _______ __________ _______ ___.
__________ ____ _______ __________ _______ _______ ________ _______ ____ __________ _____.
______ ___ __________ _________ ________ _________ _______ _______.
__________ _____ _________ ____ _____ ______ ______ ____.
_______ ______ __________ __________ _______.
____ _________ _____ _________ ___ __________ _________ _____ ____ __________.
____ ____ ________ ______ ________ _____.
________ _____ _________ ________ __________ _____ _______ _____ ______ ____ __________.
_________ ____ _________ ____ ___ ___ _______ ______ __________ _______ _________ ____.
________ ______ _______ ____ __________ _____ ______ ___ _____ ______ __________.
______ ____ ____ _________ _______ ____ __________ ______ ____ ____ __________ _________.
_________ ________ _______ ________ ________ _____ _____ ___.
___ ____ ___ _________ ____ _______ ___ __________ ___ _________.
__________ _____ ____ __________ _______ _________ ________ _______ ________ ______ _______.
_____ ____ _________ _____ ________ ___ ________ _______ ___.
__________ __________ ________ ____ ________ __________ ____ _____.
__________ _________ ________ ___ ______ ___ __________ ________ _________ _________ _________ _____.
_________ _______ ___ _____ ___ ____ ________ ___ ____ ________ ___ _______.
_____ ____ _____ __________ _____ ____ ___ __________.
___ __________ _________ _________ ___ _________ _______ _______ ____ __________ ________.
___ ________ _______ ______ ______.
____ _____ _____ ___ __________ __________ ________ ________ ____.
_____ __________ ________ __________ _______ __________ _________ _________ _____ ________ _______.
_________ ______ ___ ___ ___ ______ __________ __________.
____ ___ ________ __________ _______.
___ _______ ________ ____ __________ ________ _________ ___ _________ _________ ____.
________ _________ _______ _______ _____.
_________ ______ __________ __________ ______ ______ ______ ____ _____ ____.
________ ______ ________ _______ _______ __________ ________ ______.
_________ ______ _______ ____ _____ _______ _________.
_____ ___ _______ _________ _______ ____ _________ _________ ______ ________.
__________ ____ ________ __________ __________ ___ ___ _______ _____.
_______ ___ ________ __________ __________ ___.
___ ______ _______ _______ _____ _________ ________ ___.
____ _________ _____ ___ ____ ______ ____ ____ _____ ________ ___.
________ ________ _________ __________ _______ _____ _________ __________ ____ ________ _______ ________.
_________ _________ _________ ______ ______ _________.
_____ ________ _________ _____ __________ _____ ________ _________.
_____ _______ ___ ________ ____ ___ _____ ___ _____ _____ _________.
__________ ____ ____ ___ ___ __________.
_________ _________ ______ _________ __________ ___ ______ __________ __________.
____ _______ __________ __________ ____ ________ ______ _________ _____ ______ ___ ____.
_____ ______ _____ ______ _______ _________ ____ ____.
____ ______ ____ ____ __________ ________ _____ ________ __________ ________.
____ _______ _______ ___ ______ _____ __________.
__________ _______ _______ __________ __________ __________ ___ ____ _________ _____.
_______ ___ __________ ___ ___ ___ ___ ____ ______ __________ ________ __________.
______ ______ ___ ________ _____ ________ __________ __________.
________ ____ ________ ________ _________ ___ _____ _____ ______.
_____ __________ ______ __________ ____ _______ _________ ________ _____ __________ ____.
_________ ____ ____ ___ ______ _______ ________ _____ ________.
__________ ___ ______ __________ ___.
_________ ________ ____ _____ _______ ___ _____ ___ ________ _______ _____ ______.
________ ________ ____ _________ _______ _____ _______ ____ _______ _______ ________ _____.
___ ________ __________ _____ _________ ____ ____ ____ _________.
________ ______ _______ _________ _________ ________ ____ ______ ______ __________ ________.
_____ ___ ______ ______ _______.
____ ______ _________ ____ _________ ________ __________ _________.
_________ ________ _________ ________ ____ ____ _____ _________ __________ _______ ________ ________.
______ _____ ____ ________ __________ ___ __________ ____ __________ _____ ___.
_____ _____ ___ ___ _______ ________.
___ _________ ________ _________ ___.
___ _____ _____ __________ ________ ________ _________ _____.
_________ ___ _________ ________ ________.
____ ___ ___ _______ ____ _____ ______ ______ ______ _____ _________.
______ _________ ___ ___ ________ ________.
______ ______ _________ _______ ______ ____ __________.
________ __________ ______ _________ _________.
__________ ____ _____ ________ __________ _____ ___.
________ _____ ___ _______ ____ ______.
_______ _______ _______ ___ _______ _________ _________ _________ _______.
______ _________ ______ _____ _________.
________ ____ ____ ____ _____ _______ _____.
_____ _________ ________ ___ ___ ___ _______ ___ _______.
_______ ____ ________ ___ _______ _____ _______ __________ __________ ____.
__________ ________ _______ _________ _________ ____ ____ _______ ____ _________ ____.
___ _________ ___ __________ _________ __________ ___ __________ ________ _____ _________.
_______ _____ __________ __________ _______ _____ _______ _________ _____ _____ __________.
_________ _________ _____ ____ _____ _____ _________ _______ ____ ___.
____ ______ _______ _________ __________ ____ __________ ___ __________ _____.
________ _______ ___ ________ _____ ____ __________ ___ _______.
____ __________ __________ ______ _______ ____ _______ __________.
_________ _____ _____ ________ ________.
______ ________ ___ _____ ____.
________ ________ ___ ________ __________ _________ _________ _____ __________ ______ ___ _______.
____ __________ _________ _______ _________ _______ ______.
_________ ______ _______ _________ _____ ____ _____ _______.
_____ ________ _____ _____ ___ ____.
______ _________ ________ _________ _____ ____ ________ ________.
_______ ___ ___ _____ __________ _________ ___ ___.
________ ________ _______ ________ _________ __________ _________ _____.
________ _________ _________ ____ _______ _________ __________ __________ ______ _____ _____ _______.
__________ ________ _______ _____ _____.
____ ________ ______ ____ _________ ________ ____ ______.
____ ____ ___ _____ ___ _____ ____ ___ _____ _______ ________.
________ ____ ______.
Get Full Answer on WhatsApp
IGNOU NEWS
Assignment Submission Last Date Extended Till 30 June 2026 Click Here★★★IGNOU June 2026 TEE Date Sheet Released Click Here★★★