diff --git a/docs/src/examples/examples.jl b/docs/src/examples/examples.jl index bf63281..3b2a18c 100644 --- a/docs/src/examples/examples.jl +++ b/docs/src/examples/examples.jl @@ -22,9 +22,6 @@ using PalmerPenguins, DataFrames penguins = dropmissing(DataFrame(PalmerPenguins.load())) f = data(penguins) * mapping(:species, :bill_depth_mm, color=:sex) * visual(Beeswarm) |> draw -Makie.update_state_before_display!(f.figure) -Makie.update_state_before_display!(f.figure) -Makie.update_state_before_display!(f.figure) f # ## SwarmMakie logo @@ -43,10 +40,6 @@ f.scene.backgroundcolor[] = RGBAf(1,1,1,0) a.scene.backgroundcolor[] = RGBAf(1,1,1,0) hidedecorations!(a) hidespines!(a) -Makie.update_state_before_display!(f) -Makie.update_state_before_display!(f) -Makie.update_state_before_display!(f) -Makie.update_state_before_display!(f) f # ## Wilkinson's dot histogram diff --git a/test/runtests.jl b/test/runtests.jl index 99e813c..4fb8410 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -28,8 +28,6 @@ buffer = deepcopy(pixel_points) hidedecorations!(a) hidespines!(a) Makie.update_state_before_display!(f) - Makie.update_state_before_display!(f) - Makie.update_state_before_display!(f) img = Makie.colorbuffer(f.scene; px_per_unit = 1, pt_per_unit = 1, antialias = :none, visible = true, start_renderloop = false) # We have a matrix of all colors in the image. Now, what we do is the following: # The color white in RGBf is (1, 1, 1). For a color to be red, the blue and green components @@ -53,16 +51,13 @@ buffer = deepcopy(pixel_points) # First, we test the regular gutter with multiple categories. f, a, p = beeswarm(rand(1:3, 300), randn(300); color = rand(RGBAf, 300), markersize = 20, algorithm = SimpleBeeswarm()) Makie.update_state_before_display!(f) - Makie.update_state_before_display!(f) @test_warn "Gutter threshold exceeded" p.gutter = 0.2 # Next, we test it in direction y - f, a, p = beeswarm(rand(1:3, 300), randn(300); direction = :x, color = rand(RGBAf, 300), markersize = 20, algorithm = SimpleBeeswarm()) - Makie.update_state_before_display!(f) + f, a, p = beeswarm(rand(1:3, 300), randn(300); direction = :x, color = rand(RGBAf, 300), markersize = 20, algorithm = SimpleBeeswarm()) Makie.update_state_before_display!(f) @test_warn "Gutter threshold exceeded" p.gutter = 0.2 # and it shouldn't warn if, when using a lower markersize, the gutter is not reached. - f, a, p = beeswarm(rand(1:3, 300), randn(300); direction = :y, color = rand(RGBAf, 300), markersize = 9, algorithm = SimpleBeeswarm()) - Makie.update_state_before_display!(f) + f, a, p = beeswarm(rand(1:3, 300), randn(300); direction = :y, color = rand(RGBAf, 300), markersize = 9, algorithm = SimpleBeeswarm()) Makie.update_state_before_display!(f) @test_nowarn p.gutter = 0.5 end