JetBrains / lets-plot-kotlin

Grammar of Graphics for Kotlin
https://lets-plot.org/kotlin/
MIT License
422 stars 36 forks source link

How to make geomImage display 2d array? #106

Closed koodzi closed 1 year ago

koodzi commented 2 years ago

Is it possible to use geomImag like in this examples? https://nbviewer.org/github/JetBrains/lets-plot-docs/blob/master/source/examples/cookbook/image_101.ipynb

alshan commented 2 years ago

We haven't added geomImage to the Kotlin API yet. Perhaps we should do it.

Currently you can try to use geomRaster (see an example in its Python' counterpart geom_raster). It doesn't work with 2d arrays though.

alshan commented 1 year ago

Hi @koodzi ! What data-structure(s) would be preferable for storing a grayscale (2D) or color (RGB(A) - 3D) image data? Do you read images from files (png, tif, DEM-files) or generate them?

alshan commented 1 year ago

geomImage() added in v4.2.0

See demos: image_101, image_fisher_boat, image_grayscale, image_extent