What library should I use under linux to generate heatmaps?
I'd like to generate heatmaps pretty much like the ones in this article:
http://www.gazehawk.com/blog/experienced-users-view-reddit-differently/
The answers in this question are not entirely satisfactory because the heatmaps is generated with 开发者_如何学JAVAvery naive python code, which is very slow for large heatmaps with a large number of points.
So, any faster, more flexible and easier solution? It can be any language, I don't care.
http://www.patrick-wied.at/static/heatmapjs/
https://github.com/sunng87/heatcanvas/
I think the problem have 2 steps: generate array a[i,j] for heatmap, and plot it using density plot. The array can be generated as result of: (1) smoothing of an array with random values, or (2) Fourier transforming of array with random values. Second way will give you smoother ("nicer") and controllable result. Especially if you change the amplitudes of random harmonics depending its numbers.
Both this steps can be done in MathGL -- free (GPL, and partially LGPL) cross-platform plotting library. It is written in C++ ... So, it is fast enough.
This is a shameless plug, but I have written a heatmap library exactly because of the reasons you mention.
It's fast, portable and easy to call from any language (it's ANSI C without dependencies) as well as flexible in that you can create custom colorschemes, "stamps", point resolutions, etc.
Probably the only drawback is that it's not using the GPU (by design, I had to run it on a headless server) so while it's reasonably fast, it's still slower than GPU-based ones!
Example:
精彩评论