1

I need to generate such style image as this:

img

from matrix of numbers. Does anybody know any libs (preferable android/java) to doing it ?

Spektre
  • 49,595
  • 11
  • 110
  • 380
Hawkins
  • 407
  • 1
  • 5
  • 15
  • off topic and too broad ... what is the input exactly ... unless you reformulate your question it would get most likely closed (add what you have tried and change the question from lib request to how to code id...) ps you can use this [RGB values of visible spectrum](http://stackoverflow.com/a/22681410/2521214) to map your values to RGB gradient – Spektre Mar 10 '17 at 15:24

1 Answers1

1

Generating the image is pretty trivial - you map the data to integers in a given range, then use as index in a look-up table. If you have only a limited range, say 0-255, you can save as GIF, if the range is larger, as a 24 bit truecolour image.

The hard part is generating the palettes. I have some on my website (they're written in C but it's trivial to change them over to any other sane language). Thye show geographical height with snow-topped mountains for the high values, lush green for the valleys, and deep blue water for the depths. Another is a heat map going from cold blue to red hot.

Go to this link and take the files colourschemes.c and .h

http://www.malcolmmclean.site11.com/www/datadensity/DataDensity.html

Malcolm McLean
  • 6,258
  • 1
  • 17
  • 18