plotter: HeatMap with Rasterized smooths the heatmap
- Dominant language
- Go
- Stars
- 3k
- Forks
- 201
- PR merge metrics
- No merged PRs in 30d
Description
The addition of the rasterized option for the `plotter.HeatMap` was added to remove the lines between heat map cells resulting from vector drawing artifacts. The approach take was to make a heatmap where each heat map cell is a single pixel; the rasterisation. This small image is then rescaled to the size of the plot. This has the consequence that the image is rescaled with interpolation due to the use of `plotter.Image` which has this effect. In some cases, for example when you are plotting a continuous field you are likely to want this, but in cases where there is a discrete cell for each value, this is not correct. What the `Rasterized` option actually is a `Smoothed` option.
The original issue was raised to remove the artifactual lines, which is orthogonal. One solution is to have an unexported image rescaling function that does not interpolate. However, this loses the nice property of smooth scalar fields when they *are* wanted unless additional API knobs are added.
Contributor guide
Assessment
This issue has not been assessed yet.