diff --git a/README.md b/README.md index 49c5a3ccaa1..b425927bfe1 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ with_theme(palette = (; patchcolor = cgrad(cmap, alpha=0.45))) do band!(x, sin.(x), approx .+= x .^ 5 / 120; label = L"n = 2") band!(x, sin.(x), approx .+= -x .^ 7 / 5040; label = L"n = 3") limits!(-3.8, 3.8, -1.5, 1.5) - axislegend(; position = :ct, bgcolor = (:white, 0.75), framecolor = :orange) + axislegend(; position = :ct, backgroundcolor = (:white, 0.75), framecolor = :orange) save("./assets/approxsin.png", fig, resolution = (800, 600)) fig end diff --git a/ReferenceTests/src/tests/figures_and_makielayout.jl b/ReferenceTests/src/tests/figures_and_makielayout.jl index eba9109bdd1..6a26f75c22d 100644 --- a/ReferenceTests/src/tests/figures_and_makielayout.jl +++ b/ReferenceTests/src/tests/figures_and_makielayout.jl @@ -116,8 +116,8 @@ end lines!(ax,( 1:10) .* i, label = "$i") end # To verify that RGB values differ across entries - axislegend(ax, position = :lt, patchcolor = :red, patchsize = (100, 100), bgcolor = :gray50); - Legend(f[1, 2], ax, patchcolor = :gray80, patchsize = (100, 100), bgcolor = :gray50); + axislegend(ax, position = :lt, patchcolor = :red, patchsize = (100, 100), backgroundcolor = :gray50); + Legend(f[1, 2], ax, patchcolor = :gray80, patchsize = (100, 100), backgroundcolor = :gray50); f end end diff --git a/docs/reference/plots/datashader.md b/docs/reference/plots/datashader.md index f8bde5f5414..b3086fa15f2 100644 --- a/docs/reference/plots/datashader.md +++ b/docs/reference/plots/datashader.md @@ -217,7 +217,7 @@ We can also re-use the previous NYC example for a categorical plot: hidedecorations!(ax) hidespines!(ax) # Create a styled legend - axislegend("Vendor ID"; titlecolor=:white, framecolor=:grey, polystrokewidth=2, polystrokecolor=(:white, 0.5), rowgap=10, bgcolor=:black, labelcolor=:white) + axislegend("Vendor ID"; titlecolor=:white, framecolor=:grey, polystrokewidth=2, polystrokecolor=(:white, 0.5), rowgap=10, backgroundcolor=:black, labelcolor=:white) display(f) end ``` diff --git a/src/makielayout/blocks/legend.jl b/src/makielayout/blocks/legend.jl index 8d995e774f6..f7ef078e1ac 100644 --- a/src/makielayout/blocks/legend.jl +++ b/src/makielayout/blocks/legend.jl @@ -21,7 +21,7 @@ function initialize_block!(leg::Legend, bg = poly!(scene, legendrect, - color = leg.bgcolor, strokewidth = leg.framewidth, visible = leg.framevisible, + color = leg.backgroundcolor, strokewidth = leg.framewidth, visible = leg.framevisible, strokecolor = leg.framecolor, inspectable = false) translate!(bg, 0, 0, -7) # bg behind patches but before content at 0 (legend is at +10) diff --git a/src/makielayout/types.jl b/src/makielayout/types.jl index 7f3595833e4..c721b797005 100644 --- a/src/makielayout/types.jl +++ b/src/makielayout/types.jl @@ -1188,7 +1188,7 @@ const EntryGroup = Tuple{Any, Vector{LegendEntry}} "The additional space between the legend and its suggested boundingbox." margin = (0f0, 0f0, 0f0, 0f0) "The background color of the legend." - bgcolor = :white + backgroundcolor = :white "The color of the legend border." framecolor = :black "The line width of the legend border." diff --git a/src/themes/theme_black.jl b/src/themes/theme_black.jl index 1f0b9965b59..3ee6e7fb23d 100644 --- a/src/themes/theme_black.jl +++ b/src/themes/theme_black.jl @@ -16,7 +16,7 @@ function theme_black() ), Legend = ( framecolor = :white, - bgcolor = :black, + backgroundcolor = :black, ), Axis3 = ( xgridcolor = RGBAf(1, 1, 1, 0.16),