Examples
The following example shows how to draw a scatter plot using coordinates from the values
in a DataFrame’s columns:
import numpy as np
import pandas as pd
df = pd.DataFrame([[6.1, 4.5, 0], [5.9, 4.0, 0], [8.0, 4.2, 2],
[7.4, 4.2, 2], [6.9, 4.0, 3]],
columns=['length', 'width', 'species'])
ax1 = df.plot.scatter(x='length',
y='width',
c='DarkBlue')
Color determined by a column as well:
ax2 = df.plot.scatter(x='length',
y='width',
c='species',
colormap='viridis')