Python Foundation

+91-7982108418

MATPLOTLIB SCATTER PLOT

What is Scatter Plot?

From Wikipedia: A scatter plot (also called a scatterplot, scatter graph, scatter chart, scattergram, or scatter diagram)[3] is a type of plot or mathematical diagram using Cartesian coordinates to display values for typically two variables for a set of data. If the points are color-coded, one additional variable can be displayed. The data are displayed as a collection of points, each having the value of one variable determining the position on the horizontal axis and the value of the other variable determining the position on the vertical axis.[4]

1. Write a Python program to draw a scatter graph taking a random distribution in X and Y and plotted against each other. The code snippet gives the output shown in the following screenshot:
1. Write a Python program to draw a scatter plot with empty circles taking a random distribution in X and Y and plotted against each other. The code snippet gives the output shown in the following screenshot:
1. Write a Python program to draw a scatter plot using random distributions to generate balls of different sizes. The code snippet gives the output shown in the following screenshot:
1. 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]
1. Write a Python program to draw a scatter plot for three different groups camparing weights and heights. The code snippet gives the output shown in the following screenshot:
1. Write a Python program to draw a scatter plot for three different groups camparing weights and heights. The code snippet gives the output shown in the following screenshot:
1. Write a Python program to draw a scatter plot to find sea level rise in past 100 years. The code snippet gives the output shown in the following screenshot: