@@ -3,6 +3,7 @@ using Distributions
33using StableRNGs
44using Clustering
55using PlotsBase
6+ using StatsBase
67using RDatasets
78using Interact
89using NaNMath
238239end
239240
240241@testset " violin" begin
242+ y = [i * randn(StableRNG(1337 ), 100 ) for i ∈ 1 : 4 ]
243+ violin(y, median = true )
244+ violin(y, quantiles = [0.1 , 0.5 , 0.9 ], linecolor = :white, linewidth = 3 )
245+ violin(y, quantiles = 3 , mean = true )
246+ end
247+
248+ @testset " violin df" begin
241249 pl = violin(repeat([0.1 , 0.2 , 0.3 ], outer = 100 ), randn(StableRNG(1337 ), 300 ), side = :right)
242250 @test show(devnull , pl) isa Nothing
243251
251259 y = (1 : 20 ) .+ randn(20 ),
252260 g = repeat([" Group 1" , " Group 2" ], inner = 5 , outer = 2 )
253261 )
254- @df df groupedviolin(:x, :y, group = :g)
262+ @df df groupedviolin(:x, :y; group = :g)
255263end
256264
257265@testset " density" begin
260268end
261269
262270@testset " covellipse" begin
263- pl = covellipse([0 , 2 ], [2 1 ; 1 4 ]; n_std = 2 , aspect_ratio = 1 , label = " cov1" )
271+ pl = covellipse([0 , 2 ], [2 1 ; 1 4 ]; n_std = 2 , showaxes = true , label = " cov1" )
264272 @test show(devnull , pl) isa Nothing
265273end
266274
282290end
283291
284292@testset " boxplot / dotplot / violin" begin
285- @df singers violin(string.(:VoicePart), :Height, linewidth = 0 )
293+ @df singers violin(string.(:VoicePart), :Height, show_mean = true , show_median = true )
286294 @df singers boxplot!(string.(:VoicePart), :Height, fillalpha = 0.75 , linewidth = 2 )
287295 @df singers dotplot!(string.(:VoicePart), :Height, marker = (:black, stroke(0 )))
288296 @test true
0 commit comments