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 legendelements when children have no elements #2982

Merged
merged 1 commit into from
May 29, 2023

Conversation

jkrumbiegel
Copy link
Member

Description

Making a legend for a labeled histogram would fail because the text plot inside the hist would not return a legend element. Now that function is allowed to return an empty vector, it only fails afterwards if the combination of all subplots is still emtpy.

Type of change

Delete options that do not apply:

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

Checklist

  • Added unit tests for new algorithms, conversion methods, etc.

@MakieBot
Copy link
Collaborator

MakieBot commented May 26, 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 8.80s (8.71, 8.95) 0.09+- 1.06s (1.03, 1.10) 0.03+- 781.95ms (752.92, 812.16) 21.47+- 9.40ms (9.33, 9.49) 0.06+- 86.42ms (85.74, 87.02) 0.46+-
master 8.83s (8.70, 8.93) 0.08+- 1.09s (1.06, 1.15) 0.03+- 769.32ms (761.76, 782.30) 6.28+- 9.37ms (9.25, 9.49) 0.08+- 85.95ms (85.57, 86.35) 0.28+-
evaluation -0.30%, -0.03s invariant (-0.32d, 0.56p, 0.08std) -2.90%, -0.03s invariant (-1.10d, 0.06p, 0.03std) +1.61%, 12.62ms invariant (0.80d, 0.18p, 13.88std) +0.34%, 0.03ms invariant (0.43d, 0.43p, 0.07std) +0.54%, 0.47ms slower X (1.23d, 0.04p, 0.37std)
CairoMakie 10.03s (9.56, 11.16) 0.54+- 1.43s (1.38, 1.51) 0.04+- 316.52ms (270.20, 341.23) 24.33+- 14.74ms (14.49, 15.08) 0.18+- 7.55ms (7.32, 7.83) 0.15+-
master 10.06s (9.65, 10.63) 0.31+- 1.41s (1.36, 1.49) 0.05+- 325.26ms (308.41, 336.88) 11.10+- 14.78ms (14.36, 15.02) 0.21+- 7.64ms (7.41, 8.04) 0.22+-
evaluation -0.34%, -0.03s invariant (-0.08d, 0.89p, 0.43std) +0.95%, 0.01s invariant (0.30d, 0.58p, 0.04std) -2.76%, -8.74ms invariant (-0.46d, 0.41p, 17.71std) -0.25%, -0.04ms invariant (-0.18d, 0.74p, 0.20std) -1.14%, -0.09ms invariant (-0.45d, 0.41p, 0.19std)
WGLMakie 10.78s (10.64, 10.89) 0.09+- 1.32s (1.29, 1.34) 0.02+- 12.01s (11.79, 12.17) 0.12+- 14.08ms (13.69, 14.67) 0.32+- 890.81ms (836.70, 992.81) 52.35+-
master 10.78s (10.58, 10.91) 0.11+- 1.31s (1.27, 1.35) 0.03+- 11.97s (11.77, 12.13) 0.14+- 14.28ms (13.39, 14.93) 0.51+- 878.85ms (823.69, 996.92) 60.47+-
evaluation -0.02%, -0.0s invariant (-0.02d, 0.96p, 0.10std) +0.25%, 0.0s invariant (0.14d, 0.80p, 0.02std) +0.29%, 0.04s invariant (0.27d, 0.62p, 0.13std) -1.39%, -0.2ms invariant (-0.46d, 0.41p, 0.42std) +1.34%, 11.96ms invariant (0.21d, 0.70p, 56.41std)

@jkrumbiegel jkrumbiegel merged commit 6cc9caa into master May 29, 2023
@jkrumbiegel jkrumbiegel deleted the jk/fix-composite-fallback-legend branch May 29, 2023 14:52
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