From 5091414fb427fa95214fcefc3189e0f8c3c2c556 Mon Sep 17 00:00:00 2001 From: Anshul Singhvi Date: Mon, 27 Jan 2025 16:11:03 -0500 Subject: [PATCH 1/4] Update AlgebraOfGraphicsExt.jl --- ext/AlgebraOfGraphicsExt.jl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ext/AlgebraOfGraphicsExt.jl b/ext/AlgebraOfGraphicsExt.jl index 50b2bce..3c2db7c 100644 --- a/ext/AlgebraOfGraphicsExt.jl +++ b/ext/AlgebraOfGraphicsExt.jl @@ -2,6 +2,7 @@ module AlgebraOfGraphicsExt using SwarmMakie, AlgebraOfGraphics, Makie import AlgebraOfGraphics as AOG +# Define the "aesthetic mapping" - which kwargs go where function AlgebraOfGraphics.aesthetic_mapping(::Type{Beeswarm}, ::AOG.Normal, ::AOG.Normal) AOG.dictionary([ 1 => AOG.AesX, @@ -13,9 +14,14 @@ function AlgebraOfGraphics.aesthetic_mapping(::Type{Beeswarm}, ::AOG.Normal, ::A ]) end - +# Define the legend elements (scatter, in this case) function AOG.legend_elements(T::Type{Beeswarm}, attributes, scale_args::AOG.MixedArguments) return AOG.legend_elements(Makie.Scatter, attributes, scale_args) # same legend as Scatter end +# Instruct AoG to always merge all beeswarm plots in the same layer +# This means that if a `color` with 2 unique values is given, +# then only one beeswarm plot object is created (not two). +AOG.mergeable(::Type{<: Beeswarm}, primary) = true + end From 172e9993cd3c6ef5374d1eea0199499791eeb375 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel <22495855+jkrumbiegel@users.noreply.github.com> Date: Fri, 14 Mar 2025 12:10:29 +0100 Subject: [PATCH 2/4] bump AoG compat --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 5c74d41..98a3c45 100644 --- a/Project.toml +++ b/Project.toml @@ -20,7 +20,7 @@ KernelDensity = "0.6" Makie = "0.20, 0.21, 0.22" StatsBase = "0.34" julia = "1.9" -AlgebraOfGraphics = "0.8" +AlgebraOfGraphics = "0.8, 0.9" [extras] CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" From 8bdbf9aaee3d414ed96dbdf402379f74640bc2d0 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel <22495855+jkrumbiegel@users.noreply.github.com> Date: Fri, 14 Mar 2025 12:13:23 +0100 Subject: [PATCH 3/4] need patch version with `mergeable` method of course... --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 98a3c45..075c587 100644 --- a/Project.toml +++ b/Project.toml @@ -20,7 +20,7 @@ KernelDensity = "0.6" Makie = "0.20, 0.21, 0.22" StatsBase = "0.34" julia = "1.9" -AlgebraOfGraphics = "0.8, 0.9" +AlgebraOfGraphics = "0.9.5" [extras] CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" From fa1977b3a2231014f79b3280a5318d4a5e0244fd Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel <22495855+jkrumbiegel@users.noreply.github.com> Date: Fri, 14 Mar 2025 12:27:59 +0100 Subject: [PATCH 4/4] Update package.json --- docs/package.json | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/docs/package.json b/docs/package.json index 71458cb..0ed8718 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,18 +1,15 @@ { - "devDependencies": { - "markdown-it": "^14.0.0", - "markdown-it-mathjax3": "^4.3.2", - "vitepress": "^1.0.0-rc.43", - "vitepress-plugin-tabs": "^0.5.0", - "vitest": "^1.3.0" - }, "scripts": { "docs:dev": "vitepress dev build/.documenter", "docs:build": "vitepress build build/.documenter", "docs:preview": "vitepress preview build/.documenter" }, "dependencies": { - "@shikijs/transformers": "^1.1.7", - "markdown-it-footnote": "^4.0.0" + "@nolebase/vitepress-plugin-enhanced-readabilities": "^2.14.0", + "markdown-it": "^14.1.0", + "markdown-it-footnote": "^4.0.0", + "markdown-it-mathjax3": "^4.3.2", + "vitepress": "^1.6.3", + "vitepress-plugin-tabs": "^0.6.0" } }