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

better colorbuffer, fix record + window hiding when using save #3078

Merged
merged 5 commits into from
Jul 21, 2023

Conversation

SimonDanisch
Copy link
Member

@SimonDanisch SimonDanisch commented Jul 20, 2023

@SimonDanisch
Copy link
Member Author

added a test and fixed issues:

using CairoMakie
begin
    fig = Figure()
    ax1 = Axis(fig[1, 1])
    ax2 = Axis(fig[1, 2])
    ax3 = Axis(fig[2, 2])
    ax4 = Axis(fig[2, 1])
    scatter!(ax1, 1:10, 1:10; markersize=50, color=1:10)
    scatter!(ax2, 1:10, 1:10; markersize=50, color=:red)
    heatmap!(ax3, -8:0.1:8, 8:0.1:8, (x, y)-> sin(x) + cos(y))
    meshscatter!(ax4, 1:10, 1:10; markersize=1, color=:red)
    img1 = colorbuffer(ax1; include_decorations=true)
    img2 = colorbuffer(ax2; include_decorations=false)
    img3 = colorbuffer(ax3; include_decorations=true)
    img4 = colorbuffer(ax4; include_decorations=false)
    f, ax5, pl = image(rotr90(img1); axis=(;aspect=DataAspect()))
    ax6, pl = image(f[1, 2], rotr90(img2); axis=(; aspect=DataAspect()))
    ax7, pl = image(f[2, 2], rotr90(img3); axis=(; aspect=DataAspect()))
    ax8, pl = image(f[2, 1], rotr90(img4); axis=(; aspect=DataAspect()))
    hidedecorations!(ax5)
    hidedecorations!(ax6)
    hidedecorations!(ax7)
    hidedecorations!(ax8)
    f
end

image

@MakieBot
Copy link
Collaborator

MakieBot commented Jul 21, 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 14.28s (14.18, 14.36) 0.08+- 1.39s (1.36, 1.43) 0.02+- 896.83ms (872.93, 971.09) 34.00+- 14.24ms (13.98, 14.68) 0.24+- 167.56ms (166.27, 168.81) 0.91+-
master 14.26s (14.17, 14.40) 0.10+- 1.41s (1.39, 1.46) 0.03+- 879.34ms (862.36, 897.12) 11.47+- 14.10ms (13.85, 14.34) 0.17+- 108.65ms (107.78, 109.28) 0.68+-
evaluation +0.14%, 0.02s invariant (0.24d, 0.67p, 0.09std) -1.58%, -0.02s invariant (-0.85d, 0.14p, 0.03std) +1.95%, 17.49ms invariant (0.69d, 0.24p, 22.73std) +0.97%, 0.14ms invariant (0.65d, 0.25p, 0.21std) +35.16%, 58.91ms slower❌ (73.36d, 0.00p, 0.79std)
CairoMakie 12.06s (11.87, 12.42) 0.20+- 1.24s (1.20, 1.27) 0.03+- 267.81ms (261.18, 274.21) 5.53+- 11.93ms (11.71, 12.25) 0.18+- 7.11ms (6.98, 7.32) 0.12+-
master 12.09s (11.98, 12.30) 0.11+- 1.23s (1.22, 1.29) 0.03+- 267.41ms (262.34, 275.88) 4.31+- 12.06ms (11.88, 12.39) 0.16+- 7.09ms (7.03, 7.25) 0.07+-
evaluation -0.22%, -0.03s invariant (-0.16d, 0.77p, 0.16std) +0.31%, 0.0s invariant (0.14d, 0.80p, 0.03std) +0.15%, 0.4ms invariant (0.08d, 0.88p, 4.92std) -1.11%, -0.13ms invariant (-0.78d, 0.17p, 0.17std) +0.17%, 0.01ms invariant (0.12d, 0.82p, 0.10std)
WGLMakie 15.92s (15.76, 16.08) 0.12+- 1.46s (1.42, 1.55) 0.04+- 14.48s (14.34, 14.69) 0.12+- 19.13ms (16.65, 29.05) 4.40+- 1.44s (1.39, 1.51) 0.04+-
master 16.06s (15.62, 16.40) 0.25+- 1.46s (1.38, 1.51) 0.06+- 14.41s (14.19, 14.74) 0.19+- 16.85ms (16.08, 17.72) 0.54+- 1.43s (1.39, 1.46) 0.03+-
evaluation -0.93%, -0.15s invariant (-0.75d, 0.19p, 0.19std) +0.18%, 0.0s invariant (0.05d, 0.92p, 0.05std) +0.49%, 0.07s invariant (0.45d, 0.42p, 0.16std) +11.93%, 2.28ms noisy🤷‍♀️ (0.73d, 0.22p, 2.47std) +1.03%, 0.01s invariant (0.44d, 0.43p, 0.03std)

@github-actions
Copy link
Contributor

Missing reference images

Found 1 new images without existing references.
Upload new reference images before merging this PR.

@SimonDanisch SimonDanisch reopened this Jul 21, 2023
@SimonDanisch SimonDanisch merged commit da4414c into master Jul 21, 2023
27 checks passed
@SimonDanisch SimonDanisch deleted the sd/better-colorbuffer branch July 21, 2023 13:44
@github-actions
Copy link
Contributor

Missing reference images

Found 1 new images without existing references.
Upload new reference images before merging this PR.

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.

record does not update an interactive plot in Makie 0.19 and Makie 0.18 (fine on Makie 0.17)
2 participants