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 transforms #3552

Merged
merged 7 commits into from Jan 24, 2024
Merged

Fix CairoMakie transforms #3552

merged 7 commits into from Jan 24, 2024

Conversation

ffreyer
Copy link
Collaborator

@ffreyer ffreyer commented Jan 14, 2024

Description

Fixes #3545

Poly was using the scene transform_func rather than the plot transform_func, which can be different. For h/vspan that is the case, causing different results.

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.

@MakieBot
Copy link
Collaborator

MakieBot commented Jan 14, 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 3.58s (3.47, 3.72) 0.09+- 385.71ms (316.60, 427.14) 45.78+- 483.82ms (469.70, 507.97) 12.70+- 7.49ms (7.28, 7.76) 0.19+- 25.90ms (25.46, 26.26) 0.34+-
master 3.59s (3.50, 3.70) 0.09+- 418.58ms (395.81, 440.63) 14.99+- 498.06ms (470.90, 534.15) 20.83+- 7.56ms (7.26, 7.97) 0.25+- 25.93ms (25.44, 26.30) 0.33+-
evaluation 1.00x invariant, -0.01s (-0.11d, 0.84p, 0.09std) 1.09x noisy🤷‍♀️, -32.87ms (-0.96d, 0.11p, 30.39std) 1.03x invariant, -14.24ms (-0.83d, 0.15p, 16.76std) 1.01x invariant, -0.07ms (-0.31d, 0.57p, 0.22std) 1.00x invariant, -0.03ms (-0.10d, 0.86p, 0.34std)
CairoMakie 3.16s (3.07, 3.23) 0.06+- 335.83ms (313.83, 361.27) 15.85+- 149.55ms (138.16, 166.37) 9.82+- 7.42ms (7.21, 7.75) 0.18+- 606.99μs (601.30, 616.72) 5.75+-
master 3.14s (3.06, 3.26) 0.07+- 332.87ms (319.60, 356.90) 13.33+- 145.64ms (140.37, 155.82) 5.57+- 7.48ms (7.12, 7.94) 0.31+- 612.93μs (608.21, 621.30) 5.78+-
evaluation 0.99x invariant, 0.02s (0.37d, 0.51p, 0.07std) 0.99x invariant, 2.96ms (0.20d, 0.71p, 14.59std) 0.97x invariant, 3.92ms (0.49d, 0.38p, 7.69std) 1.01x invariant, -0.06ms (-0.23d, 0.68p, 0.24std) 1.01x invariant, -5.93μs (-1.03d, 0.08p, 5.77std)
WGLMakie 3.76s (3.74, 3.78) 0.02+- 323.75ms (319.80, 329.13) 3.16+- 8.95s (8.85, 9.14) 0.10+- 9.44ms (9.34, 9.58) 0.08+- 71.51ms (68.65, 77.37) 3.28+-
master 3.75s (3.73, 3.79) 0.03+- 322.54ms (317.55, 329.40) 3.74+- 8.96s (8.83, 9.16) 0.12+- 9.37ms (9.20, 9.59) 0.16+- 70.35ms (67.82, 82.06) 5.18+-
evaluation 1.00x invariant, 0.0s (0.17d, 0.76p, 0.02std) 1.00x invariant, 1.21ms (0.35d, 0.52p, 3.45std) 1.00x invariant, -0.01s (-0.10d, 0.85p, 0.11std) 0.99x invariant, 0.08ms (0.61d, 0.29p, 0.12std) 0.98x invariant, 1.16ms (0.27d, 0.63p, 4.23std)

@ffreyer
Copy link
Collaborator Author

ffreyer commented Jan 14, 2024

Refimg sets Axis transform function to log10 and then plots with transformation = Transformation():

Screenshot from 2024-01-14 15-38-49

If the backend uses the scene transform function this should result in strong differences, e.g. for CairMakie master:

Screenshot from 2024-01-14 15-39-45

@SimonDanisch SimonDanisch merged commit 2b97ce7 into master Jan 24, 2024
17 checks passed
@SimonDanisch SimonDanisch deleted the ff/fix_cairomakie_transforms branch January 24, 2024 12:48
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.

Issues with h/vspan and h/hspan in log space
3 participants