lets-plot-skia
lets-plot-skia copied to clipboard
geomRaster uses incorrect colours
In the compose-desktop demo, a plot with geomRaster shows the wrong colours. A plot with geomPoint shows blue circles, while geomRaster shows orange/brown tiles. The legend on the right shows blue colours in both versions.
To reproduce this issue, check the following diff on a fork of this repository.
Note that 'raster' geom (like 'tile' geom) naturally implies a regular grid structure. Nevertheless, you are right—the colors are broken. Another failed example here with 25k points and the bin2d stat:
// return letsPlot(data) + geomPoint(size = 8, alpha = 0.3, sampling = samplingNone) {
return letsPlot(data) + geomRaster(stat=Stat.bin2D(), sampling = samplingNone) {
x = "x"
y = "y"
fill = "col"
}
Fixed in v3.0.1