MakieOrg / SwarmMakie.jl

Beeswarm plots for Makie.jl!
https://makieorg.github.io/SwarmMakie.jl/
MIT License
12 stars 1 forks source link

Be able to take categorical input #28

Open wardjm opened 2 weeks ago

wardjm commented 2 weeks ago

I know I can convert string categories to 0,1,2,... and then pass to beeswarm, but it would be convenient to be able to pass the categories directly in.

xs::Vector{String} = ["a", "b"]
ys::Vector{Float64} = [1.0, 2.0]

beeswarm(xs, ys)
asinghvi17 commented 2 weeks ago

That should work already if you wrap in Makie.Categorical, but we probably need some dimension expansion defs here.

wardjm commented 2 weeks ago

Thanks! Works perfectly. I hadn't seen that before.