geom_pointdensity()¶import numpy as np
import pandas as pd
from lets_plot import *
from lets_plot.geo_data import *
from lets_plot.bistro import *
LetsPlot.setup_html()
sample_size = 1000
df_full = pd.read_csv("https://raw.githubusercontent.com/JetBrains/lets-plot-docs/refs/heads/master/data/diamonds.csv")
print(df_full.shape)
df = df_full.sample(sample_size, random_state=42).reset_index(drop=True)
df.head()
ggplot(df_full, aes("carat", "price")) + geom_pointdensity()