Beeswarm plots in Makie!
The entry point to this package is the beeswarm
recipe, which accepts input the same way scatter
does in all respects -- plus a keyword algorithm
, which specifies the beeswarm algorithm!
using SwarmMakie, CairoMakie
ys = rand(150)
beeswarm(ones(length(ys)), ys)
![](https://private-user-images.githubusercontent.com/32143268/311479345-5b422b52-0017-4bd2-8c61-22ad195266b1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUxOTUxNDMsIm5iZiI6MTcyNTE5NDg0MywicGF0aCI6Ii8zMjE0MzI2OC8zMTE0NzkzNDUtNWI0MjJiNTItMDAxNy00YmQyLThjNjEtMjJhZDE5NTI2NmIxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAxVDEyNDcyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI4YzcyZmUzNDU0OGMyN2Q3ZTdkNjFkMDEwZjk0NmM0OGU3NjQ1ZmMxZjU0YWQ2Mzc2MThlZDMyNWY2ODM3NTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.O8s4auc6ELumXTaX_ogWZPt20YyINsCSxlshbaeCaVI)
using SwarmMakie, CairoMakie
xs = rand(1:4, 500)
ys = randn(500)
beeswarm(xs, ys; color = xs)
![](https://private-user-images.githubusercontent.com/32143268/311479364-861f36f9-d431-41a3-8823-6d96edac0017.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUxOTUxNDMsIm5iZiI6MTcyNTE5NDg0MywicGF0aCI6Ii8zMjE0MzI2OC8zMTE0NzkzNjQtODYxZjM2ZjktZDQzMS00MWEzLTg4MjMtNmQ5NmVkYWMwMDE3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAxVDEyNDcyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNmMTU5N2UzMjk4ZDQ1NDMzMzA2NzRjNGIzMGRiY2I2MjMyZWQ5ZDAyYmMyMjBlNDY5MzU4MzhkZGQyMGJmNmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.0GlaZtRAEvTP8estVW2dLSAxToMA6DcVF3a8J5ZntgE)
See the docs for more!