1. Write a Python program to draw a line with suitable label in the x axis, y axis and a title.
Output:
2. Write a Python program to draw a line using given axis values with suitable label in the x
axis , y axis and a title.
Output:
3. Write a Python program to plot two or more lines on same plot with suitable legends of
each line.
Output:
4. Write a Python program to plot two or more lines with legends, different widths and
colors.
Output:
5. Write a Python program to plot two or more lines and set the line markers.
Output:
6. Write a Python program to plot several lines with different format styles in one command
using arrays.
Output:
7. Write a Python program to create multiple plots with labels.
Output:
8. Write a Python programming to display a bar chart of the popularity of programming
Languages.
Sample data:
Programming languages: Java, Python, PHP, JavaScript, C#, C++
Popularity: 22.2, 17.6, 8.8, 8, 7.7, 6.7
Output:
9. Write a Python programming to create a pie chart of the popularity of programming
Languages.
Sample data:
Programming languages: Java, Python, PHP, JavaScript, C#, C++
Popularity: 22.2, 17.6, 8.8, 8, 7.7, 6.7
Output:
10. Write a Python program to draw a scatter graph taking a random distribution in X and Y
and plotted against each other.
Output:
11. Write a Python program to draw a scatter plot using random distributions to generate
balls of different sizes.
Output:
12. Write a Python program to draw a scatter plot comparing two subject marks of
Mathematics and Science. Use marks of 10 students.
Sample data: Test Data:
math_marks = [88, 92, 80, 89, 100, 80, 60, 100, 80, 34]
science_marks = [35, 79, 79, 48, 100, 88, 32, 45, 20, 30]
marks_range = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]