Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CairoMakie heatmap offsets #4633

Merged
merged 8 commits into from
Nov 29, 2024
Merged

Fix CairoMakie heatmap offsets #4633

merged 8 commits into from
Nov 29, 2024

Conversation

ffreyer
Copy link
Collaborator

@ffreyer ffreyer commented Nov 26, 2024

Description

Fixes #4053

We extend heatmap cells by half a pixel in every direction when alpha == 1 to avoid gaps opening. This shifts the borders by half a pixel. I removed the padding for the side that covers other cells which fixes things for me. The other 0.5 padding is still there so this should still close gaps.

image

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Added an entry in CHANGELOG.md (for new features and breaking changes)
  • Added or changed relevant sections in the documentation
  • Added unit tests for new algorithms, conversion methods, etc.
  • Added reference image tests for new plotting functions, recipes, visual options, etc.

@MakieBot
Copy link
Collaborator

MakieBot commented Nov 26, 2024

Benchmark Results

SHA: f6ef3c8de29c822504f9e30b6168650f8e9a1495

Warning

These results are subject to substantial noise because GitHub's CI runs on shared machines that are not ideally suited for benchmarking.

GLMakie
CairoMakie
WGLMakie

@ffreyer
Copy link
Collaborator Author

ffreyer commented Nov 26, 2024

Widened the pad on the hidden side to a full pixel/unit since some 3D tests show gaps: (And fail because of it)
image
Screenshot 2024-11-26 223820

@ffreyer
Copy link
Collaborator Author

ffreyer commented Nov 26, 2024

Tests still fail because cells shifted (es expected). Heatmap 3D might be slightly worse in terms of coverage/gaps now, hard to tell. You can see the cell size being more accurate there though

@ffreyer ffreyer marked this pull request as ready for review November 26, 2024 22:58
@SimonDanisch SimonDanisch reopened this Nov 29, 2024
@SimonDanisch SimonDanisch merged commit 068670b into master Nov 29, 2024
39 of 41 checks passed
@SimonDanisch SimonDanisch deleted the ff/fix-heatmap-offset branch November 29, 2024 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

heatmap slightly misaligned with respect to axis coordinates
3 participants