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

add interpolate option to volume #3485

Merged
merged 2 commits into from
Dec 18, 2023
Merged

add interpolate option to volume #3485

merged 2 commits into from
Dec 18, 2023

Conversation

SimonDanisch
Copy link
Member

@SimonDanisch SimonDanisch commented Dec 18, 2023

Feature for https://discourse.julialang.org/t/how-to-unsmooth-glmakie-volume-plot/107659/3

using GLMakie

f, ax, pl = volume([0; 0; 0;; 0; 0; 0;; 0; 0; 0;;;
        0; 0; 0;; 0; 1; 0;; 0; 0; 0;;;
        0; 0; 0;; 0; 0; 0;; 0; 0; 0];  interpolate=false, axis=(; type=Axis3, title="interpolate=false"))

volume(f[1, 2], [0; 0; 0;; 0; 0; 0;; 0; 0; 0;;;
        0; 0; 0;; 0; 1; 0;; 0; 0; 0;;;
        0; 0; 0;; 0; 0; 0;; 0; 0; 0]; interpolate=true, axis=(; type=Axis3, title="interpolate=true"))
f
image

@MakieBot
Copy link
Collaborator

MakieBot commented Dec 18, 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(fig)
using create display create display
GLMakie 3.83s (3.77, 3.86) 0.03+- 445.27ms (425.11, 459.68) 11.54+- 530.43ms (513.46, 567.51) 18.58+- 8.39ms (8.24, 8.53) 0.11+- 26.69ms (26.43, 27.08) 0.20+-
master 3.82s (3.78, 3.87) 0.03+- 448.58ms (434.80, 462.55) 9.65+- 526.66ms (518.24, 541.63) 9.06+- 8.19ms (7.92, 8.41) 0.20+- 26.65ms (26.45, 26.98) 0.20+-
evaluation 1.00x invariant, 0.0s (0.13d, 0.81p, 0.03std) 1.01x invariant, -3.31ms (-0.31d, 0.57p, 10.59std) 0.99x invariant, 3.77ms (0.26d, 0.64p, 13.82std) 0.98x slower X, 0.21ms (1.31d, 0.04p, 0.15std) 1.00x invariant, 0.03ms (0.17d, 0.76p, 0.20std)
CairoMakie 3.25s (3.20, 3.32) 0.04+- 341.60ms (320.93, 384.72) 23.61+- 149.77ms (144.98, 160.33) 5.26+- 8.13ms (7.97, 8.24) 0.12+- 628.45μs (620.52, 635.77) 5.55+-
master 3.24s (3.16, 3.33) 0.07+- 334.98ms (321.64, 350.70) 11.12+- 147.92ms (139.62, 155.91) 5.08+- 7.95ms (7.75, 8.28) 0.16+- 615.28μs (611.35, 621.07) 3.79+-
evaluation 1.00x invariant, 0.01s (0.16d, 0.78p, 0.05std) 0.98x invariant, 6.62ms (0.36d, 0.52p, 17.37std) 0.99x invariant, 1.85ms (0.36d, 0.52p, 5.17std) 0.98x slower X, 0.18ms (1.22d, 0.04p, 0.14std) 0.98x slower X, 13.17μs (2.77d, 0.00p, 4.67std)
WGLMakie 3.91s (3.82, 3.99) 0.07+- 339.16ms (317.27, 357.69) 16.17+- 8.99s (8.73, 9.20) 0.22+- 9.44ms (9.06, 10.07) 0.35+- 71.51ms (68.33, 79.77) 4.47+-
master 3.87s (3.82, 3.93) 0.04+- 334.90ms (321.84, 353.87) 10.24+- 9.01s (8.68, 9.29) 0.23+- 9.70ms (9.16, 11.63) 0.86+- 70.66ms (67.95, 79.12) 4.07+-
evaluation 0.99x invariant, 0.05s (0.85d, 0.14p, 0.06std) 0.99x invariant, 4.27ms (0.32d, 0.57p, 13.21std) 1.00x invariant, -0.02s (-0.10d, 0.85p, 0.22std) 1.03x invariant, -0.26ms (-0.40d, 0.48p, 0.61std) 0.99x invariant, 0.85ms (0.20d, 0.72p, 4.27std)

@SimonDanisch SimonDanisch merged commit 01d57f1 into master Dec 18, 2023
15 checks passed
@SimonDanisch SimonDanisch deleted the sd/interpolate-volume branch December 18, 2023 15:33
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.

2 participants