add test
This commit is contained in:
parent
21afb6250a
commit
1b393d13f1
@ -656,7 +656,7 @@ function default(k::Symbol)
|
||||
return _axis_defaults_byletter[letter][key]
|
||||
end
|
||||
k == :letter && return k # for type recipe processing
|
||||
k in _suppress_warnings || error("Unknown key: ", k)
|
||||
return missing
|
||||
end
|
||||
|
||||
function default(k::Symbol, v)
|
||||
@ -1133,7 +1133,7 @@ function warn_on_unsupported_args(pkg::AbstractBackend, plotattributes)
|
||||
k in _suppress_warnings && continue
|
||||
default_value = default(k)
|
||||
if ismissing(default_value)
|
||||
extra_kwargs[k] = pop!(plotattributes, k)
|
||||
extra_kwargs[k] = pop_kw!(plotattributes, k)
|
||||
elseif plotattributes[k] != default(k)
|
||||
k in already_warned || push!(_to_warn, k)
|
||||
end
|
||||
|
||||
@ -341,8 +341,8 @@ function _expand_subplot_extrema(sp::Subplot, plotattributes::AKW, st::Symbol)
|
||||
end
|
||||
|
||||
function _add_the_series(plt, sp, plotattributes)
|
||||
plt[:extra_kwargs][:series] = warnOnUnsupported_args(plt.backend, plotattributes)
|
||||
warnOnUnsupported(plt.backend, plotattributes)
|
||||
plt[:extra_kwargs][:series] = warn_on_unsupported_args(plt.backend, plotattributes)
|
||||
warn_on_unsupported(plt.backend, plotattributes)
|
||||
series = Series(plotattributes)
|
||||
push!(plt.series_list, series)
|
||||
push!(sp.series_list, series)
|
||||
|
||||
@ -326,3 +326,9 @@ end
|
||||
# end
|
||||
end # testset
|
||||
end # testset
|
||||
|
||||
@testset "Extra kwargs" begin
|
||||
pl = plot(1:5, test = "me")
|
||||
@test pl.attr[:extra_kwargs][:series][:test] == "me"
|
||||
|
||||
end # testset
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user