-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
able to scale violin in different ways #3352
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
I would like to convert it into a draft since I noticed that scaling by amount should not be treated as a default behavior, and matplotlib doesn't scale it either. |
seaborn supports scaling by amount by setting |
now using Makie, CairoMakie
fig = Figure()
xs = vcat([fill(i, i * 1000) for i in 1:4]...)
ys = vcat(randn(6000), randn(4000) * 2)
for (i, scale) in enumerate([:area, :count, :width])
ax = Axis(fig[i, 1])
violin!(ax, xs, ys; scale, show_median=true)
Makie.xlims!(0.2, 4.8)
ax.title = "scale=:$(scale)"
end
fig |
Sorry for the delay, this looks good and useful to me! Only needs a changelog entry, and ideally a reference test in here https://github.com/MakieOrg/Makie.jl/blob/master/ReferenceTests/src/tests/examples2d.jl if you could add one. I don't seem to be able to edit your branch. |
Thank you very much! I will update it soon :) |
Hi. Sorry. I am not familiar with fig = Figure()
xs = vcat([fill(i, i * 1000) for i in 1:4]...)
ys = vcat(randn(6000), randn(4000) * 2)
for (i, scale) in enumerate([:area, :count, :width])
ax = Axis(fig[i, 1])
violin!(ax, xs, ys; scale, show_median=true)
Makie.xlims!(0.2, 4.8)
ax.title = "scale=:$(scale)"
end
fig |
Yes exactly, the reference test is just supposed to confirm that the visual output of a plotting function stays the same over time, so you can reuse the example that demonstrates the functionality in the docs. |
The changelog and reference test have been added. The checks report |
All good, we have to upload those. Three because of the three tested backends. |
@jkrumbiegel Hi! I run into the following error when click
v0.20.0 is the default tag. When I try other tags:
|
Sorry I wasn't clear, by |
:). Thanks. BTW, there is an error in the readme of Pkg.develop(path=joinpath(dirname(dirname(pathof(Makie))), "ReferenceUpdater")) The original cmd will run into errors. |
thanks for the PR! It's merged from the other branch now where I had to make some small edits :) |
fix #3351