Quantcast
Channel: OxyPlot (moved to GitHub)
Viewing all articles
Browse latest Browse all 2061

New Post: Heatmap interpolation color

$
0
0
Interesting :) I think this is a bug when Interpolate = true.
The heat map is rendered by interpolating a bitmap, and this is not the same as the interpolation of the palette.
At the center of each pixel it will be correct, but between pixels may be wrong.

It can be reproduced by
        [Example("D501409: Interpolation Issue")]
        publicstatic PlotModel InterpolationIssue()
        {
            var data = newdouble[2, 3];
            data[0, 0] = -10;
            data[0, 1] = 10;

            var model = new PlotModel("HeatMapSeries");
            model.Axes.Add(new LinearColorAxis { Position = AxisPosition.Right, Palette = new OxyPalette(OxyColors.Red, OxyColors.Green, OxyColors.Blue) });

            var hms = new HeatMapSeries
            {
                CoordinateDefinition = HeatMapCoordinateDefinition.Edge,
                X0 = 0,
                X1 = 2,
                Y0 = 0,
                Y1 = 3,
                Data = data,
                Interpolate = true,
                LabelFontSize = 0.2
            };
            model.Series.Add(hms);
            return model;
        }
Does anyone know how this can be fixed?

Viewing all articles
Browse latest Browse all 2061

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>