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

Allow Cycled colors to be passed with transparency like normal colors #3611

Closed
wants to merge 1 commit into from

Conversation

asinghvi17
Copy link
Member

Description

A quick fix which allows Cycled colors to be passed with transparency a la (Cycled(n), α). Will add a test as well!

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 Feb 7, 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.51s (3.49, 3.54) 0.02+- 395.72ms (390.58, 400.54) 3.44+- 480.15ms (471.24, 519.77) 17.56+- 7.39ms (7.32, 7.50) 0.06+- 25.72ms (25.60, 26.01) 0.13+-
master 3.51s (3.47, 3.53) 0.02+- 406.56ms (391.58, 415.02) 9.33+- 476.10ms (470.86, 482.55) 4.37+- 7.38ms (7.28, 7.55) 0.09+- 25.71ms (25.65, 25.85) 0.07+-
evaluation 1.00x invariant, 0.0s (0.21d, 0.70p, 0.02std) 1.03x faster ✓, -10.84ms (-1.54d, 0.02p, 6.38std) 0.99x invariant, 4.05ms (0.32d, 0.57p, 10.96std) 1.00x invariant, 0.02ms (0.20d, 0.71p, 0.08std) 1.00x invariant, 0.01ms (0.05d, 0.93p, 0.10std)
CairoMakie 3.01s (2.98, 3.05) 0.02+- 315.93ms (314.43, 317.54) 1.35+- 138.81ms (138.08, 139.53) 0.60+- 7.14ms (7.10, 7.19) 0.03+- 604.96μs (595.12, 614.98) 5.95+-
master 2.99s (2.97, 3.01) 0.01+- 315.43ms (314.42, 316.46) 0.79+- 138.49ms (138.02, 138.93) 0.34+- 6.97ms (6.92, 7.06) 0.05+- 601.85μs (599.01, 606.75) 3.02+-
evaluation 0.99x slower X, 0.02s (1.31d, 0.03p, 0.02std) 1.00x invariant, 0.5ms (0.45d, 0.42p, 1.07std) 1.00x invariant, 0.32ms (0.67d, 0.24p, 0.47std) 0.98x slower X, 0.17ms (4.19d, 0.00p, 0.04std) 0.99x invariant, 3.1μs (0.66d, 0.25p, 4.48std)
WGLMakie 3.64s (3.61, 3.67) 0.02+- 322.89ms (319.10, 332.21) 4.76+- 8.97s (8.80, 9.31) 0.17+- 9.46ms (8.94, 11.34) 0.84+- 72.18ms (67.93, 77.79) 3.59+-
master 3.66s (3.61, 3.69) 0.03+- 320.28ms (316.16, 331.14) 5.30+- 8.78s (8.72, 8.84) 0.05+- 9.03ms (8.91, 9.12) 0.08+- 72.21ms (67.66, 80.89) 5.55+-
evaluation 1.00x invariant, -0.01s (-0.62d, 0.27p, 0.02std) 0.99x invariant, 2.61ms (0.52d, 0.35p, 5.03std) 0.98x slower X, 0.18s (1.44d, 0.03p, 0.11std) 0.96x invariant, 0.42ms (0.71d, 0.23p, 0.46std) 1.00x invariant, -0.03ms (-0.01d, 0.99p, 4.57std)

@jkrumbiegel
Copy link
Member

Currently the way cycling works is a bit murky, and we should clarify how exactly these values are supposed to be resolved and where. Things changed here a bit as well because of recent Scene refactors. I don't feel comfortable right now adding further behaviors on top of that stack to be honest.

@asinghvi17
Copy link
Member Author

Fair enough, we can wait on this then.

@SimonDanisch
Copy link
Member

Closing this for now then, to not have it linger in the active PR list ;)

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.

4 participants