Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.5"

[extras]
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Expand Down
15 changes: 6 additions & 9 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
8 changes: 7 additions & 1 deletion ext/AlgebraOfGraphicsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Loading