My code is:
import pandas as pd
from lets_plot import *
LetsPlot.setup_html()
data = pd.read_csv('https://raw.githubusercontent.com/JetBrains/lets-plot-docs/master/data/mpg2.csv')
ggplot(data, aes(x="engine horsepower", y="miles per gallon")) + geom_point(aes(color="origin of car"))
In R
, using ggplot2
, I would manually set the colors by writing:
... + scale_color_manual(values = c("US" = "red", "Asia" = "green", "Europe" = "blue")
How can I do the same in Python
with lets-plot
?
lets-plot
reference manual for this function doesn't seem to help: here