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 transformation if space is Observable #4402

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ffreyer
Copy link
Collaborator

@ffreyer ffreyer commented Sep 24, 2024

Description

Fixes #4400, #3571

The issue was that get(plot, key) returns an Observable and apply_transform() does not dereference that observable. So if space = Observable(:data) it is seen as space != :data.

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 Sep 24, 2024

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 4.38s (4.33, 4.59) 0.09+- 107.47ms (103.89, 119.01) 5.55+- 461.48ms (441.15, 502.94) 20.36+- 9.25ms (8.84, 9.67) 0.28+- 25.94ms (25.62, 26.87) 0.43+-
master 4.40s (4.32, 4.48) 0.06+- 104.96ms (103.68, 106.54) 1.17+- 463.09ms (460.86, 466.45) 2.17+- 9.50ms (9.25, 9.75) 0.21+- 25.94ms (25.65, 26.29) 0.22+-
evaluation 1.01x invariant, -0.02s (-0.28d, 0.61p, 0.08std) 0.98x invariant, 2.51ms (0.63d, 0.28p, 3.36std) 1.00x invariant, -1.61ms (-0.11d, 0.84p, 11.27std) 1.03x invariant, -0.26ms (-1.03d, 0.08p, 0.24std) 1.00x invariant, -0.0ms (-0.01d, 0.99p, 0.32std)
CairoMakie 4.17s (4.11, 4.25) 0.05+- 107.72ms (106.33, 112.76) 2.41+- 168.68ms (166.68, 173.80) 2.33+- 9.50ms (9.42, 9.64) 0.08+- 1.14ms (1.13, 1.15) 0.01+-
master 4.14s (4.11, 4.18) 0.02+- 106.46ms (105.82, 107.89) 0.83+- 167.11ms (165.47, 169.76) 1.35+- 9.60ms (9.53, 9.68) 0.06+- 1.13ms (1.12, 1.14) 0.01+-
evaluation 0.99x invariant, 0.04s (0.91d, 0.12p, 0.04std) 0.99x invariant, 1.26ms (0.70d, 0.23p, 1.62std) 0.99x invariant, 1.56ms (0.82d, 0.16p, 1.84std) 1.01x faster ✓, -0.1ms (-1.44d, 0.02p, 0.07std) 0.99x slower X, 0.01ms (1.27d, 0.04p, 0.01std)
WGLMakie 4.71s (4.65, 4.86) 0.07+- 112.80ms (106.16, 124.46) 6.94+- 9.07s (8.93, 9.27) 0.12+- 11.72ms (11.32, 11.97) 0.24+- 117.66ms (114.70, 122.07) 2.63+-
master 4.74s (4.65, 4.81) 0.05+- 109.78ms (104.52, 119.13) 5.28+- 9.55s (9.41, 9.68) 0.11+- 11.71ms (11.19, 12.70) 0.55+- 119.20ms (116.57, 123.39) 2.24+-
evaluation 1.01x invariant, -0.04s (-0.64d, 0.26p, 0.06std) 0.97x invariant, 3.02ms (0.49d, 0.38p, 6.11std) 1.05x faster✅, -0.48s (-4.15d, 0.00p, 0.12std) 1.00x invariant, 0.02ms (0.04d, 0.95p, 0.40std) 1.01x invariant, -1.55ms (-0.63d, 0.26p, 2.44std)

Copy link
Member

@SimonDanisch SimonDanisch left a comment

Choose a reason for hiding this comment

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

Looks good... Maybe a simple test?

@ffreyer ffreyer marked this pull request as ready for review September 26, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Work in progress
Development

Successfully merging this pull request may close these issues.

xscale not working as expected on linesegment plots
3 participants