AIML Worksheet 4
AIML Worksheet 4
Experiment - 1.4
1. Aim:
Implementation of Python Libraries for ML application such as Pandas and
. Matplotlib
2. Objective:
The objective of this experiment is to of Python Libraries for ML application .
. such as Pandas and Matplotlib and analyze its performance and characteristics.
3. Algorithm
1. Create a line plot using the x and y data.
2. Set labels for the x-axis and y-axis of the plot.
3. Set the title of the plot.
4. Display the plot using plt.show().
5. Create a scatter plot using the x and y data.
6. Set the color, marker style, and label for the data points.
7. Display the legend on the plot.
8. Display the scatter plot using plt.show().
4. Code
import matplotlib.pyplot as plt
x = [1, 2, 3, 4, 5] y
= [10, 15, 7, 12, 9]
plt.plot(x, y)
plt.xlabel('X-axis')
plt.ylabel('Y-axis')
plt.title('Basic Line Plot')
plt.show()
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING
#scatter plot
plt.scatter(x, y, color='red', marker='o', label='Data
Points')
plt.legend()
plt.show()
5. Output