I have a dataset looks like the following
x y label
1 2 True
2 3 False
1.3 0 True
....
x, y is exactly the x and y axis, dataframe contains roughly 1 million rows
I want to color the scatter plot with label density, how can I achieve that with ggplot
code I have:
ggplot(data, aes(x='x', y='y', color="label_denstiy")) + \
geom_point(size=75,alpha=0.25)
Comment:
"color by label" is different than "color by label density". for example, I have here two values of label, so color by label will give me only two colors. But color by label density will give me gradually color change (from dark to light) from region where label true is dense to, for example, where label true is sparse