Skip to content

Heatmap: Manually defined Extent does not produce the expected output #4552

@swharden

Description

@swharden

Related to #4550, I noticed this doesn't produce quite the expected output. The issue is that Extent defines the range of cell CENTERS or CORNERS (depending on alignment), but I think many people who manually set Extent want to define the edges of the heatmap. I'll use this issue to track renaming Extent to Rectangle and figuring how how to achieve a more commonly expected result.

// create a heatmap of any size
double[,] data = {
    { 1, 2, 3 },
    { 4, 5, 6 },
    { 7, 8, 9 },
};

// add the heatmap to the plot
var hm = myPlot.Add.Heatmap(data);

// place the heatmap in a rectangle defined in coordinate space
hm.Extent= new CoordinateRect(-5, 5, -5, 5);

ISSUE: I'd expect the heatmap edges to go to -5 and +5 on both axes
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