YData = np.random. XData = np.random.random_integers(18, 50, 50)
![make a scatter plot matplotlib make a scatter plot matplotlib](https://www.alphacodingskills.com/matplotlib/img/scatter-plot-2.png)
The python module matplotlib.pyplot has the function scatter()which generates scatter plots from two different arrays of datasets.
![make a scatter plot matplotlib make a scatter plot matplotlib](https://stackabuse.s3.amazonaws.com/media/matplotlib-scatterplot-tutorial-and-examples-1.png)
A scatter plot is usually drawn prior to fitting a regression line or while analyzing the relationship between two variables. Here is the syntax to create scatter, line and bar charts using matplotlib: Scatter plot.Either of the variables can be considered in either of the axes. You can create a scatter plot in Python with matplotlib’s plt.scatter function as follows: import matplotlib.pyplot as plt.The above point means that the scatter plot may illustrate that a relationship exists, but it does not and cannot ascertain that one variable is causing the other.Correlation displayed in the scatter plot does not infer causality between two variables.
![make a scatter plot matplotlib make a scatter plot matplotlib](https://i.stack.imgur.com/cpptk.png)
A scatter plot is a two dimensional graph that depicts the correlation or association between two variables or two datasets Scatter plots’ primary uses are to observe and show relationships between two numeric variables.Drawing a scatter plot using Matplotlib Overview: