Skip to content

Heatmap: Render is incorrectly placed by 1 pixel #1084

@swharden

Description

@swharden

While working on #1003 I noticed that when the axis limits are set to the exact dimensions of the heatmap the black lines that normally outline the plot (axis lines) are missing on the top left suggesting it's off by 1 pixel. There's also a row of white pixels on the bottom which could be related (and/or an anti-aliasing rendering artifact). Since there's no white column on the right I question if the bitmap is also being accidentally rendered 1px too wide.

var plt = new ScottPlot.Plot(400, 300);
var hm = plt.AddHeatmap(data, lockScales: false);
plt.AddColorbar(hm.Colormap);
plt.SetAxisLimits(0, data.GetLength(1), 0, data.GetLength(0));

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions