Heatmap Settings
val df = DataFrame.readCSV(
fileOrUrl = "https://raw.githubusercontent.com/Kotlin/dataframe/master/examples/idea-examples/titanic/src/main/resources/titanic.csv",
delimiter = ';', parserOptions = ParserOptions(locale = java.util.Locale.FRENCH)
)
df.plot {
heatmap("embarked", "pclass") {
borderLine {
width = 0.8
color = Color.BLACK
}
fillColor(Stat.count) {
scale = continuous(Color.WHITE..Color.RED)
legend.name = "number of\n passangers"
}
}
y.axis.breaks(df["pclass"].distinct().toList(), format = "d")
}
Last modified: 25 November 2023