Skip to content

Commit

Permalink
replace bgcolor with backgroundcolor
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasIsensee committed Sep 27, 2023
1 parent 2b8b8a1 commit 52e27ab
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ReferenceTests/src/tests/figures_and_makielayout.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/plots/datashader.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
2 changes: 1 addition & 1 deletion src/makielayout/blocks/legend.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion src/makielayout/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
2 changes: 1 addition & 1 deletion src/themes/theme_black.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function theme_black()
),
Legend = (
framecolor = :white,
bgcolor = :black,
backgroundcolor = :black,
),
Axis3 = (
xgridcolor = RGBAf(1, 1, 1, 0.16),
Expand Down

0 comments on commit 52e27ab

Please sign in to comment.