%useLatestDescriptors
%use lets-plot
%use dataframe
LetsPlot.getInfo()
Lets-Plot Kotlin API v.4.4.2. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.4.0.0.
var df = DataFrame.readCSV("https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/docs/examples/data/mpg.csv")
df.head(3)
DataFrame: rowsCount = 3, columnsCount = 12
val p = ggplot(df.toMap()) + geomPoint {x = "cty"; y = "hwy"}
gggrid(
plots = listOf(
p + ggtitle("themeMinimal2() - the default"),
p + ggtitle("themeGrey()") + themeGrey(),
p + ggtitle("themeBW()") + themeBW(),
p + ggtitle("themeLight()") + themeLight(),
p + ggtitle("themeClassic()") + themeClassic(),
p + ggtitle("themeMinimal()") + themeMinimal(),
),
ncol = 2,
cellWidth = 400,
cellHeight = 300,
vGap = 0,
fit = true
)
val pf = p + facetGrid(x = "drv")
gggrid(
plots = listOf(
pf + ggtitle("themeMinimal2() - the default"),
pf + ggtitle("themeGrey()") + themeGrey(),
pf + ggtitle("themeBW()") + themeBW(),
pf + ggtitle("themeLight()") + themeLight(),
pf + ggtitle("themeClassic()") + themeClassic(),
pf + ggtitle("themeMinimal()") + themeMinimal(),
),
ncol = 1,
cellWidth = 700,
cellHeight = 200,
vGap = 0,
fit = true
)