WebPlotDigitizer icon indicating copy to clipboard operation
WebPlotDigitizer copied to clipboard

Feature request: Support continuous and discrete heat maps

Open mrtichou opened this issue 2 years ago • 1 comments

A nice feature I thought about lately is the digitizing of heat-map-like plots, like the ones shown here: image

Given a 2d image, and a color bar (with no color used twice), one could extract the values of the depicted field with a desired resolution.

Calibration inputs would then be:

  • 2 points on the x-axis
  • 2 points on the y axis
  • 2 points on the color bar.

Other inputs:

  • desired output x and y resolution
  • color tolerance: if a color on the plot is too far from any of the color bar, the value should be NaN.

One could even go further by supporting heat maps with polar coordinates, or log scale axis.

mrtichou avatar Apr 10 '22 16:04 mrtichou

By concept, the question is related to the dot planimetry approach mentioned earlier (see here) with maps of discrete levels in mind. Perhaps some of it may be used as inspiration.

A brief & accessible introduction into this topic (Steinhaus, Abell, etc.) is provided e.g., by Chris Staecker's youtube video Dot planimeter Review / HowTo. In your case, the levels are continuous; though this adds a bit of difficulty, I speculate the digitizer's color distance

digitizer_detail

could trade with this as successful as it already does with 2D plots.


Side note on the color scheme used: Consider one with continuous transient hue between the extrema. This renders the depiction color safer (including passing the plot a xerox) and some types of color blindness. For illustration, see e.g a few adjusted gnuplot color maps based on work by Kenneth Moreland. Additional background for this large topic are e.g., his talk about viridis, or by Kristen Thyng about matplotlib maps used in oceanography and «patterns to try» in colorbrewer2.

nbehrnd avatar Apr 10 '22 17:04 nbehrnd