![print umber in instead of dots in scatter plot matplotlib print umber in instead of dots in scatter plot matplotlib](https://3qeqpr26caki16dnhd19sv6by6v-wpengine.netdna-ssl.com/wp-content/uploads/2017/12/Scatter-Plot-of-Circles-Test-Classification-Problem.png)
This tutorial covers how to do just that with some.
![print umber in instead of dots in scatter plot matplotlib print umber in instead of dots in scatter plot matplotlib](https://i.stack.imgur.com/zzq5t.png)
Import matplotlib.pyplot as plt import numpy as np a = np.array(, ]) categories = np.array() colormap = np.array() plt.scatter(a, a, s=100, c=colormap) plt.savefig('ScatterClassPlot.png') plt.show() Scatter plot with custom colors Import matplotlib.pyplot as plt x = y = plt.scatter(x, y, c='coral') x = y = plt.scatter(x, y, c='lightblue') plt.title('Nuage de points avec Matplotlib') plt.xlabel('x') plt.ylabel('y') plt.savefig('ScatterPlot_05.png') plt.show() Scatter plots with several colors using a colormapĮxample of how to associate a color to a given number or class ( source): How to create a scatter plot with several colors in matplotlib ? First simple example that combine two scatter plots with different colors: To change the color of a scatter point in matplotlib, there is the option "c" in the function scatter.
![print umber in instead of dots in scatter plot matplotlib print umber in instead of dots in scatter plot matplotlib](https://cdn-ak.f.st-hatena.com/images/fotolife/y/yamayou_1/20210318/20210318163446.png)
Scatter plots with several colors using a colormapĬombining two scatter plots with different colors.Combining two scatter plots with different colors.