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 Cairo scatter marker conversion to be overridden #3811

Merged
merged 6 commits into from Apr 29, 2024

Conversation

asinghvi17
Copy link
Member

Description

This PR allows external packages like MakieTeX to override Makie.to_spritemarker for Cairo and vector formats, while still exploiting Makie.to_spritemarker to convert to images.

The PR also bumps the CairoMakie version to prepare for a release.

Type of change

Delete options that do not apply:

  • New feature (non-breaking change which adds functionality)

Checklist

  • Added an entry in CHANGELOG.md (for new features and breaking changes)

@MakieBot
Copy link
Collaborator

MakieBot commented Apr 26, 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.46s (3.37, 3.57) 0.06+- 173.75ms (166.55, 182.42) 6.59+- 482.15ms (469.33, 501.17) 10.39+- 7.71ms (7.47, 8.17) 0.25+- 25.98ms (25.78, 26.16) 0.16+-
master 3.44s (3.38, 3.51) 0.05+- 171.76ms (165.55, 178.51) 4.46+- 475.49ms (467.76, 493.27) 8.51+- 7.52ms (7.33, 7.76) 0.13+- 25.94ms (25.78, 26.26) 0.16+-
evaluation 0.99x invariant, 0.02s (0.31d, 0.57p, 0.06std) 0.99x invariant, 1.99ms (0.35d, 0.52p, 5.52std) 0.99x invariant, 6.66ms (0.70d, 0.21p, 9.45std) 0.98x invariant, 0.19ms (0.93d, 0.12p, 0.19std) 1.00x invariant, 0.04ms (0.26d, 0.63p, 0.16std)
CairoMakie 3.16s (3.10, 3.26) 0.06+- 175.66ms (168.69, 182.88) 5.62+- 108.14ms (103.68, 112.52) 3.57+- 7.86ms (7.54, 8.05) 0.20+- 897.03μs (887.64, 913.81) 8.61+-
master 3.13s (3.09, 3.24) 0.07+- 175.90ms (170.65, 181.69) 4.41+- 106.78ms (103.80, 114.94) 4.20+- 7.61ms (7.47, 7.86) 0.13+- 910.34μs (892.48, 927.87) 16.25+-
evaluation 0.99x invariant, 0.03s (0.42d, 0.45p, 0.06std) 1.00x invariant, -0.24ms (-0.05d, 0.93p, 5.01std) 0.99x invariant, 1.36ms (0.35d, 0.53p, 3.88std) 0.97x slower X, 0.25ms (1.50d, 0.02p, 0.16std) 1.01x invariant, -13.32μs (-1.02d, 0.09p, 12.43std)
WGLMakie 3.79s (3.70, 3.83) 0.04+- 239.00ms (172.29, 401.58) 105.94+- 9.04s (8.90, 9.18) 0.10+- 10.52ms (9.78, 13.97) 1.53+- 69.26ms (68.26, 69.83) 0.55+-
master 3.75s (3.73, 3.79) 0.02+- 395.32ms (390.39, 411.66) 7.34+- 8.99s (8.88, 9.09) 0.08+- 9.83ms (9.66, 9.96) 0.13+- 69.35ms (68.43, 70.19) 0.56+-
evaluation 0.99x invariant, 0.04s (1.06d, 0.08p, 0.03std) 1.65x faster✅, -156.32ms (-2.08d, 0.01p, 56.64std) 0.99x invariant, 0.05s (0.54d, 0.34p, 0.09std) 0.93x noisy🤷‍♀️, 0.69ms (0.64d, 0.28p, 0.83std) 1.00x invariant, -0.09ms (-0.16d, 0.77p, 0.55std)

@asinghvi17 asinghvi17 marked this pull request as ready for review April 27, 2024 14:23
@asinghvi17
Copy link
Member Author

Tested this with MakieTeX and the API works great. This also removes FFTW as a direct dependency of CairoMakie.

@asinghvi17 asinghvi17 changed the base branch from master to v0.20.10 April 29, 2024 14:19
@asinghvi17 asinghvi17 merged commit 40af275 into v0.20.10 Apr 29, 2024
@asinghvi17 asinghvi17 deleted the as/cairo-scatter-markers branch April 29, 2024 14:20
@jkrumbiegel
Copy link
Member

Was this already reviewed?

@asinghvi17
Copy link
Member Author

By Simon on Slack, yes

SimonDanisch added a commit that referenced this pull request May 6, 2024
* Upgrade to DelaunayTriangulation v1.0 (#3787)

* Upgrade to DelaunayTriangulation v1.0

* Updates for DelaunayTriangulation v1.0

* changelog

* Allow Cairo scatter marker conversion to be overridden (#3811)

* Define cairo_scatter_marker api

* Bump CairoMakie version

* Implement cairo_scatter_marker API for scatter and meshscatter

* Add to changelog

* MeshScatter conversion is different, don't implement

* fix ticks for categorical colorbar (#3762)

* Update tricontourf.md in 0.20.10 branch (#3828)

Update tricontourf.md

* fix docs

---------

Co-authored-by: Daniel VandenHeuvel <95613936+DanielVandH@users.noreply.github.com>
Co-authored-by: Simon <sdanisch@protonmail.com>
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.

None yet

3 participants