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 brack data_limits #3201

Merged
merged 4 commits into from
Sep 7, 2023
Merged

fix brack data_limits #3201

merged 4 commits into from
Sep 7, 2023

Conversation

SimonDanisch
Copy link
Member

#3179 introduced a regression in the data_limits for brackets, and since our reference images tests still have a way too high threshold, it didn't fail the tests.
@ffreyer, you think there are other places where this happened which are untested?
We should definitely look into the refimages this time before merging!

@MakieBot
Copy link
Collaborator

MakieBot commented Sep 1, 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(display(fig))
using create display create display
GLMakie 12.16s (12.09, 12.22) 0.05+- 1.20s (1.18, 1.23) 0.02+- 747.29ms (719.27, 801.82) 27.33+- 10.86ms (10.76, 11.03) 0.10+- 142.46ms (140.00, 144.12) 1.30+-
master 12.19s (12.06, 12.41) 0.12+- 1.20s (1.14, 1.24) 0.03+- 739.34ms (723.60, 752.85) 12.09+- 10.87ms (10.61, 11.04) 0.15+- 141.42ms (138.99, 143.88) 1.48+-
evaluation -0.24%, -0.03s invariant (-0.32d, 0.57p, 0.08std) +0.25%, 0.0s invariant (0.12d, 0.83p, 0.02std) +1.06%, 7.96ms invariant (0.38d, 0.50p, 19.71std) -0.13%, -0.01ms invariant (-0.11d, 0.84p, 0.13std) +0.73%, 1.04ms invariant (0.74d, 0.19p, 1.39std)
CairoMakie 10.03s (9.81, 10.19) 0.14+- 1.21s (1.18, 1.25) 0.03+- 223.62ms (220.15, 231.15) 4.19+- 9.73ms (9.54, 10.00) 0.14+- 5.82ms (5.68, 6.02) 0.12+-
master 9.99s (9.75, 10.25) 0.16+- 1.16s (1.11, 1.21) 0.04+- 230.63ms (219.32, 242.00) 8.55+- 9.74ms (9.45, 10.14) 0.23+- 5.78ms (5.63, 5.98) 0.12+-
evaluation +0.40%, 0.04s invariant (0.26d, 0.63p, 0.15std) +4.15%, 0.05s slower X (1.45d, 0.02p, 0.03std) -3.14%, -7.01ms invariant (-1.04d, 0.08p, 6.37std) -0.07%, -0.01ms invariant (-0.03d, 0.95p, 0.19std) +0.58%, 0.03ms invariant (0.28d, 0.61p, 0.12std)
WGLMakie 16.22s (16.07, 16.36) 0.11+- 1.66s (1.59, 1.78) 0.06+- 15.23s (15.02, 15.56) 0.20+- 21.98ms (21.12, 23.04) 0.78+- 1.40s (1.34, 1.45) 0.04+-
master 16.37s (16.08, 16.90) 0.27+- 1.70s (1.66, 1.74) 0.03+- 15.20s (15.01, 15.51) 0.17+- 22.13ms (20.67, 23.17) 0.85+- 1.40s (1.38, 1.43) 0.02+-
evaluation -0.91%, -0.15s invariant (-0.71d, 0.22p, 0.19std) -2.36%, -0.04s invariant (-0.81d, 0.17p, 0.04std) +0.20%, 0.03s invariant (0.16d, 0.77p, 0.19std) -0.70%, -0.15ms invariant (-0.19d, 0.73p, 0.81std) +0.06%, 0.0s invariant (0.02d, 0.97p, 0.03std)

@ffreyer
Copy link
Collaborator

ffreyer commented Sep 1, 2023

@testset "Axis scale" begin
# This just shouldn't error
try
fig, ax, li = lines(1:10, 1:10)
vlines!(ax, 3)
hlines!(ax, 3)
bp = barplot!(ax, 1 .+ 5 .* rand(10))
vspan!(ax, 3, 4)
hspan!(ax, 3, 4)
bracket!(ax, 1, 1, 2, 2)
eb = errorbars!(ax, 1:10, 1:10, [0.3 for _ in 1:10], whiskerwidth = 5)
text!(ax, Point2f(2), text = "abba")
tooltip!(ax, Point2f(8), "baab")
tricontourf!(ax, 1 .+ 4 .* rand(5), 1 .+ 4 .* rand(5), rand(5))
qqplot!(ax, 5:10, 1:5)
ax.yscale = log10
ax.yscale = identity
ax.yscale = log10
ax.yscale = identity
@test true
catch e
@test false
rethrow(e)
end
end

This one is erroring for me in #3040, possibly for the same reason. It includes most/all of the mixed-space plots and the limits look fine to me on this branch. So that's probably a good sign.
Maybe we can also extend this to check limits to catch these kind of issues in future? (This would probably need the update-on-display thing?)

@SimonDanisch SimonDanisch merged commit 2836626 into master Sep 7, 2023
15 checks passed
@SimonDanisch SimonDanisch deleted the sd/fix-brackets branch September 7, 2023 08:59
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.

3 participants