I’d like to create a violin plot of a
DataFrame and set each “violin” at its linear respective position. For example, this plot:
# some data to play with n = 10000 f(k) = randn(k) df2 = DataFrame(hcat(f(n).+1, f(n).-1, 2*f(n), 0.5*f(n)-3, 2*f(n).^2, abs.(f(n))), map(num->Symbol(num),[4,10,15,20,22,30])); # Now plot a violin of each "Set" on the same graph @df df2 violin(cols(), xticks=(1:ncol(df2), names(df2)))
… has all the “violins” evenly spaced. I’d like to place them according to their numeric column name. I.e., the x-axis would be linear and the first “violin” would be centered above
4, the next would be centered above
10, …, and the last “violin” would be centered above
How can this
violin plot be created?