more fixes
This commit is contained in:
parent
4ed195f8d9
commit
3aa6cca70f
@ -1271,7 +1271,7 @@ function gr_get_legend_geometry(viewport_plotarea, sp)
|
||||
x_legend_offset = (viewport_plotarea[2] - viewport_plotarea[1]) / 30
|
||||
y_legend_offset = (viewport_plotarea[4] - viewport_plotarea[3]) / 30
|
||||
|
||||
dy = get(sp[:extra_kwargs], :legend_hfactor, 1)
|
||||
dy *= get(sp[:extra_kwargs], :legend_hfactor, 1)
|
||||
legendh = dy * legendn
|
||||
|
||||
return (
|
||||
|
||||
@ -72,13 +72,11 @@ const _all_args = sort(union([
|
||||
for arg in _all_args
|
||||
add_aliases(arg, makeplural(arg))
|
||||
end
|
||||
# add all non_underscored forms to the _keyAliases
|
||||
add_non_underscore_aliases!(_keyAliases)
|
||||
|
||||
# fill symbol cache
|
||||
for letter in (:x, :y, :z)
|
||||
_attrsymbolcache[letter] = Dict{Symbol, Symbol}()
|
||||
for k in keys(_axis_defaults)
|
||||
for k in _axis_args
|
||||
# populate attribute cache
|
||||
lk = Symbol(letter, k)
|
||||
_attrsymbolcache[letter][k] = lk
|
||||
@ -89,3 +87,6 @@ for letter in (:x, :y, :z)
|
||||
_attrsymbolcache[letter][k] = Symbol(letter, k)
|
||||
end
|
||||
end
|
||||
|
||||
# add all non_underscored forms to the _keyAliases
|
||||
add_non_underscore_aliases!(_keyAliases)
|
||||
|
||||
@ -65,6 +65,9 @@ end
|
||||
end
|
||||
|
||||
@testset "axis-aliases" begin
|
||||
@test haskey(Plots._keyAliases, :xguideposition)
|
||||
@test haskey(Plots._keyAliases, :x_guide_position)
|
||||
@test !haskey(Plots._keyAliases, :xguide_position)
|
||||
p = plot(1:2, xl = "x label")
|
||||
@test p[1][:xaxis][:guide] === "x label"
|
||||
p = plot(1:2, xrange = (0, 3))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user