%matplotlib inline
from ggplot import *
import pandas as pd
scale_color_identity¶scale_color_identity applies the color values in your data to your ggplots.
ze_colors = [
"blue",
"red",
"green",
"MediumAquaMarine",
"Peru",
"Tomato",
"#f8b195",
"#ffb6c1",
"#933835",
"Bisque"
]
df = pd.DataFrame({
"x": range(10),
"y": range(10),
"ze-color": ze_colors
})
df
ggplot(df, aes(x='x', y='y', color='ze-color')) + \
geom_point(size=7500) + \
scale_color_identity()