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 incorrect limits in h/vlines and h/vspan #3427

Merged
merged 4 commits into from
Dec 1, 2023
Merged

Conversation

ffreyer
Copy link
Collaborator

@ffreyer ffreyer commented Nov 28, 2023

Description

Fixes #3271

Since we removed the back-and-forth transformation in those plots the child plots end up in a transformed space (i.e. post transform_func). With the default data_limits just looking at child plots we end up getting transformed limits as a result. This pr fixes that by adding custom data_limits methods.

Type of change

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

Checklist

  • Added an entry in NEWS.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.

@ffreyer ffreyer marked this pull request as draft November 28, 2023 18:47
@MakieBot
Copy link
Collaborator

MakieBot commented Nov 28, 2023

Compile Times benchmark

Note, that these numbers may fluctuate on the CI servers, so take them with a grain of salt. All benchmark results are based on the mean time and negative percent mean faster than the base branch. Note, that GLMakie + WGLMakie run on an emulated GPU, so the runtime benchmark is much slower. Results are from running:

using_time = @ctime using Backend
# Compile time
create_time = @ctime fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @ctime Makie.colorbuffer(display(fig))
# Runtime
create_time = @benchmark fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @benchmark Makie.colorbuffer(fig)
using create display create display
GLMakie 3.59s (3.46, 3.64) 0.06+- 415.96ms (395.52, 429.11) 11.24+- 499.21ms (472.88, 534.74) 18.45+- 8.06ms (7.85, 8.24) 0.15+- 26.22ms (26.04, 26.49) 0.14+-
master 3.55s (3.44, 3.65) 0.09+- 407.32ms (387.99, 429.94) 17.42+- 485.06ms (468.78, 508.00) 15.13+- 7.82ms (7.54, 8.14) 0.28+- 25.87ms (25.39, 26.27) 0.40+-
evaluation 0.99x invariant, 0.04s (0.51d, 0.36p, 0.07std) 0.98x invariant, 8.63ms (0.59d, 0.30p, 14.33std) 0.97x invariant, 14.15ms (0.84d, 0.14p, 16.79std) 0.97x invariant, 0.24ms (1.09d, 0.07p, 0.21std) 0.99x invariant, 0.35ms (1.17d, 0.06p, 0.27std)
CairoMakie 3.05s (2.96, 3.19) 0.08+- 332.60ms (319.35, 359.30) 13.25+- 147.45ms (141.31, 158.58) 5.55+- 7.70ms (7.55, 7.92) 0.13+- 606.46μs (601.09, 612.31) 4.63+-
master 3.04s (2.95, 3.14) 0.08+- 335.92ms (318.73, 369.43) 17.67+- 147.99ms (140.79, 159.28) 7.20+- 7.76ms (7.47, 8.18) 0.28+- 608.38μs (600.71, 617.67) 5.99+-
evaluation 1.00x invariant, 0.01s (0.17d, 0.76p, 0.08std) 1.01x invariant, -3.32ms (-0.21d, 0.70p, 15.46std) 1.00x invariant, -0.54ms (-0.08d, 0.88p, 6.37std) 1.01x invariant, -0.06ms (-0.30d, 0.59p, 0.20std) 1.00x invariant, -1.93μs (-0.36d, 0.51p, 5.31std)
WGLMakie 3.68s (3.66, 3.75) 0.03+- 321.39ms (317.38, 327.89) 3.23+- 8.72s (8.61, 8.85) 0.10+- 9.54ms (9.39, 9.70) 0.12+- 71.82ms (66.73, 83.48) 5.79+-
master 3.69s (3.66, 3.76) 0.04+- 323.57ms (317.66, 332.39) 5.73+- 8.69s (8.55, 8.87) 0.12+- 9.60ms (9.36, 9.76) 0.14+- 77.58ms (67.49, 84.37) 7.15+-
evaluation 1.00x invariant, -0.01s (-0.24d, 0.66p, 0.04std) 1.01x invariant, -2.17ms (-0.47d, 0.40p, 4.48std) 1.00x invariant, 0.03s (0.29d, 0.60p, 0.11std) 1.01x invariant, -0.06ms (-0.47d, 0.39p, 0.13std) 1.08x noisy🤷‍♀️, -5.76ms (-0.88d, 0.12p, 6.47std)

@ffreyer ffreyer marked this pull request as ready for review November 28, 2023 19:18
@SimonDanisch SimonDanisch merged commit 5abc303 into master Dec 1, 2023
15 checks passed
@SimonDanisch SimonDanisch deleted the ff/fix_hvlines branch December 1, 2023 08:49
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.

Error on valid data for hlines! with log scale
3 participants