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 filtering #1828

Merged
merged 7 commits into from
May 31, 2022
Merged

Conversation

jkrumbiegel
Copy link
Member

Description

Heatmap filtering was broken again because it used Cairo.FILTER_BEST, which does nothing in bitmap backends. This PR fixes that and reorders the logic a bit, so it should be easier to follow why the surface or rectangle path is chosen.

Type of change

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

Checklist

  • Added unit tests
  • Added reference image tests for new plotting functions, recipes, visual options, etc.

* wpx, hpx: projected size of the image in pixels, so the actual width in pixels on screen
* w, h: size of image in pixels
"""
function interpolation_flag(is_vector, interp, wpx, hpx, w, h)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not leave this in a function?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the flag logic didn't work anyway, there's no point in switching between the three, there's only two basically. So the main logic isn't about picking the flag but deciding whether to take the fast path or not.

@MakieBot
Copy link
Collaborator

MakieBot commented May 20, 2022

Compile Times benchmark

Note, that these numbers may fluctuate on the CI servers, so take them with a grain of salt.

using time

master:  9.65 < 10.33 > 10.76, 0.35+-
pr:      10.15 < 10.39 > 10.95, 0.29+-
speedup: 0.93 < 1.00 > 1.02, 0.04+-
median:  +0.62% => invariant

This PR does not change the using time.

ttfp time

master   29.12 < 29.97 > 32.78, 1.23+-
pr       28.05 < 29.47 > 30.35, 0.80+-
speedup: 0.98 < 1.02 > 1.08, 0.04+-
median:  -1.67% => invariant

This PR does not change the ttfp time.

@SimonDanisch SimonDanisch merged commit da5ad31 into master May 31, 2022
@SimonDanisch SimonDanisch deleted the jk/fix-heatmap-filtering branch May 31, 2022 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants