lets-plot-skia icon indicating copy to clipboard operation
lets-plot-skia copied to clipboard

geomRaster uses incorrect colours

Open DaMasterM opened this issue 2 months ago • 1 comments

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.

Image Image

DaMasterM avatar Sep 29 '25 12:09 DaMasterM

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"
        }
Image

alshan avatar Sep 30 '25 17:09 alshan

Fixed in v3.0.1

alshan avatar Dec 03 '25 00:12 alshan