Format .jl files [skip ci] (#3795)
Co-authored-by: t-bltg <t-bltg@users.noreply.github.com>
This commit is contained in:
parent
748104c807
commit
34758c82a3
26
src/args.jl
26
src/args.jl
@ -616,7 +616,7 @@ const _all_series_args = sort(union([_series_args; _magic_series_args]))
|
|||||||
const _all_plot_args = _plot_args
|
const _all_plot_args = _plot_args
|
||||||
|
|
||||||
for letter in (:x, :y, :z)
|
for letter in (:x, :y, :z)
|
||||||
_attrsymbolcache[letter] = Dict{Symbol, Symbol}()
|
_attrsymbolcache[letter] = Dict{Symbol,Symbol}()
|
||||||
for k in keys(_axis_defaults)
|
for k in keys(_axis_defaults)
|
||||||
# populate attribute cache
|
# populate attribute cache
|
||||||
lk = Symbol(letter, k)
|
lk = Symbol(letter, k)
|
||||||
@ -1237,8 +1237,10 @@ function processGridArg!(plotattributes::AKW, arg, letter)
|
|||||||
plotattributes[get_attr_symbol(letter, :foreground_color_grid)] =
|
plotattributes[get_attr_symbol(letter, :foreground_color_grid)] =
|
||||||
arg.color in (:auto, :match) ? :match : plot_color(arg.color)
|
arg.color in (:auto, :match) ? :match : plot_color(arg.color)
|
||||||
)
|
)
|
||||||
arg.alpha === nothing || (plotattributes[get_attr_symbol(letter, :gridalpha)] = arg.alpha)
|
arg.alpha === nothing ||
|
||||||
arg.style === nothing || (plotattributes[get_attr_symbol(letter, :gridstyle)] = arg.style)
|
(plotattributes[get_attr_symbol(letter, :gridalpha)] = arg.alpha)
|
||||||
|
arg.style === nothing ||
|
||||||
|
(plotattributes[get_attr_symbol(letter, :gridstyle)] = arg.style)
|
||||||
|
|
||||||
# linealpha
|
# linealpha
|
||||||
elseif allAlphas(arg)
|
elseif allAlphas(arg)
|
||||||
@ -1249,7 +1251,11 @@ function processGridArg!(plotattributes::AKW, arg, letter)
|
|||||||
plotattributes[get_attr_symbol(letter, :gridlinewidth)] = arg
|
plotattributes[get_attr_symbol(letter, :gridlinewidth)] = arg
|
||||||
|
|
||||||
# color
|
# color
|
||||||
elseif !handleColors!(plotattributes, arg, get_attr_symbol(letter, :foreground_color_grid))
|
elseif !handleColors!(
|
||||||
|
plotattributes,
|
||||||
|
arg,
|
||||||
|
get_attr_symbol(letter, :foreground_color_grid),
|
||||||
|
)
|
||||||
@warn("Skipped grid arg $arg.")
|
@warn("Skipped grid arg $arg.")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1286,7 +1292,11 @@ function processMinorGridArg!(plotattributes::AKW, arg, letter)
|
|||||||
plotattributes[get_attr_symbol(letter, :minorgrid)] = true
|
plotattributes[get_attr_symbol(letter, :minorgrid)] = true
|
||||||
|
|
||||||
# color
|
# color
|
||||||
elseif handleColors!(plotattributes, arg, get_attr_symbol(letter, :foreground_color_minor_grid))
|
elseif handleColors!(
|
||||||
|
plotattributes,
|
||||||
|
arg,
|
||||||
|
get_attr_symbol(letter, :foreground_color_minor_grid),
|
||||||
|
)
|
||||||
plotattributes[get_attr_symbol(letter, :minorgrid)] = true
|
plotattributes[get_attr_symbol(letter, :minorgrid)] = true
|
||||||
else
|
else
|
||||||
@warn("Skipped grid arg $arg.")
|
@warn("Skipped grid arg $arg.")
|
||||||
@ -1413,7 +1423,11 @@ function RecipesPipeline.preprocess_attributes!(plotattributes::AKW)
|
|||||||
# handle individual axes font args
|
# handle individual axes font args
|
||||||
for letter in (:x, :y, :z)
|
for letter in (:x, :y, :z)
|
||||||
for fontname in (:tickfont, :guidefont)
|
for fontname in (:tickfont, :guidefont)
|
||||||
args = RecipesPipeline.pop_kw!(plotattributes, get_attr_symbol(letter, fontname), ())
|
args = RecipesPipeline.pop_kw!(
|
||||||
|
plotattributes,
|
||||||
|
get_attr_symbol(letter, fontname),
|
||||||
|
(),
|
||||||
|
)
|
||||||
for arg in wraptuple(args)
|
for arg in wraptuple(args)
|
||||||
processFontArg!(plotattributes, get_attr_symbol(letter, fontname), arg)
|
processFontArg!(plotattributes, get_attr_symbol(letter, fontname), arg)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -68,7 +68,11 @@ function process_axis_arg!(plotattributes::AKW, arg, letter = "")
|
|||||||
elseif typeof(arg) <: Function
|
elseif typeof(arg) <: Function
|
||||||
plotattributes[get_attr_symbol(letter, :formatter)] = arg
|
plotattributes[get_attr_symbol(letter, :formatter)] = arg
|
||||||
|
|
||||||
elseif !handleColors!(plotattributes, arg, get_attr_symbol(letter, :foreground_color_axis))
|
elseif !handleColors!(
|
||||||
|
plotattributes,
|
||||||
|
arg,
|
||||||
|
get_attr_symbol(letter, :foreground_color_axis),
|
||||||
|
)
|
||||||
@warn("Skipped $(letter)axis arg $arg")
|
@warn("Skipped $(letter)axis arg $arg")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -463,7 +467,8 @@ function expand_extrema!(sp::Subplot, plotattributes::AKW)
|
|||||||
# TODO: need more here... gotta track the discrete reference value
|
# TODO: need more here... gotta track the discrete reference value
|
||||||
# as well as any coord offset (think of boxplot shape coords... they all
|
# as well as any coord offset (think of boxplot shape coords... they all
|
||||||
# correspond to the same x-value)
|
# correspond to the same x-value)
|
||||||
plotattributes[letter], plotattributes[get_attr_symbol(letter, :(_discrete_indices))] =
|
plotattributes[letter],
|
||||||
|
plotattributes[get_attr_symbol(letter, :(_discrete_indices))] =
|
||||||
discrete_value!(axis, data)
|
discrete_value!(axis, data)
|
||||||
expand_extrema!(axis, plotattributes[letter])
|
expand_extrema!(axis, plotattributes[letter])
|
||||||
end
|
end
|
||||||
|
|||||||
@ -62,7 +62,7 @@ end
|
|||||||
|
|
||||||
for k in (:linthresh, :base, :label)
|
for k in (:linthresh, :base, :label)
|
||||||
# add PyPlot specific symbols to cache
|
# add PyPlot specific symbols to cache
|
||||||
_attrsymbolcache[k] = Dict{Symbol, Symbol}()
|
_attrsymbolcache[k] = Dict{Symbol,Symbol}()
|
||||||
for letter in (:x, :y, :z, Symbol(""), :top, :bottom, :left, :right)
|
for letter in (:x, :y, :z, Symbol(""), :top, :bottom, :left, :right)
|
||||||
_attrsymbolcache[k][letter] = Symbol(k, letter)
|
_attrsymbolcache[k][letter] = Symbol(k, letter)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1216,7 +1216,7 @@ function mesh3d_triangles(x, y, z, cns)
|
|||||||
end
|
end
|
||||||
|
|
||||||
# cache joined symbols so they can be looked up instead of constructed each time
|
# cache joined symbols so they can be looked up instead of constructed each time
|
||||||
const _attrsymbolcache = Dict{Symbol, Dict{Symbol, Symbol}}()
|
const _attrsymbolcache = Dict{Symbol,Dict{Symbol,Symbol}}()
|
||||||
|
|
||||||
get_attr_symbol(letter::Symbol, keyword::String) = get_attr_symbol(letter, Symbol(keyword))
|
get_attr_symbol(letter::Symbol, keyword::String) = get_attr_symbol(letter, Symbol(keyword))
|
||||||
get_attr_symbol(letter::Symbol, keyword::Symbol) = _attrsymbolcache[letter][keyword]
|
get_attr_symbol(letter::Symbol, keyword::Symbol) = _attrsymbolcache[letter][keyword]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user