Skip to content

Commit 3c7f10f

Browse files
authored
Format .jl files [skip ci]
1 parent b28a261 commit 3c7f10f

File tree

5 files changed

+42
-24
lines changed

5 files changed

+42
-24
lines changed

Diff for: src/args.jl

+20-6
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ const _all_series_args = sort(union([_series_args; _magic_series_args]))
616616
const _all_plot_args = _plot_args
617617

618618
for letter in (:x, :y, :z)
619-
_attrsymbolcache[letter] = Dict{Symbol, Symbol}()
619+
_attrsymbolcache[letter] = Dict{Symbol,Symbol}()
620620
for k in keys(_axis_defaults)
621621
# populate attribute cache
622622
lk = Symbol(letter, k)
@@ -1237,8 +1237,10 @@ function processGridArg!(plotattributes::AKW, arg, letter)
12371237
plotattributes[get_attr_symbol(letter, :foreground_color_grid)] =
12381238
arg.color in (:auto, :match) ? :match : plot_color(arg.color)
12391239
)
1240-
arg.alpha === nothing || (plotattributes[get_attr_symbol(letter, :gridalpha)] = arg.alpha)
1241-
arg.style === nothing || (plotattributes[get_attr_symbol(letter, :gridstyle)] = arg.style)
1240+
arg.alpha === nothing ||
1241+
(plotattributes[get_attr_symbol(letter, :gridalpha)] = arg.alpha)
1242+
arg.style === nothing ||
1243+
(plotattributes[get_attr_symbol(letter, :gridstyle)] = arg.style)
12421244

12431245
# linealpha
12441246
elseif allAlphas(arg)
@@ -1249,7 +1251,11 @@ function processGridArg!(plotattributes::AKW, arg, letter)
12491251
plotattributes[get_attr_symbol(letter, :gridlinewidth)] = arg
12501252

12511253
# color
1252-
elseif !handleColors!(plotattributes, arg, get_attr_symbol(letter, :foreground_color_grid))
1254+
elseif !handleColors!(
1255+
plotattributes,
1256+
arg,
1257+
get_attr_symbol(letter, :foreground_color_grid),
1258+
)
12531259
@warn("Skipped grid arg $arg.")
12541260
end
12551261
end
@@ -1286,7 +1292,11 @@ function processMinorGridArg!(plotattributes::AKW, arg, letter)
12861292
plotattributes[get_attr_symbol(letter, :minorgrid)] = true
12871293

12881294
# color
1289-
elseif handleColors!(plotattributes, arg, get_attr_symbol(letter, :foreground_color_minor_grid))
1295+
elseif handleColors!(
1296+
plotattributes,
1297+
arg,
1298+
get_attr_symbol(letter, :foreground_color_minor_grid),
1299+
)
12901300
plotattributes[get_attr_symbol(letter, :minorgrid)] = true
12911301
else
12921302
@warn("Skipped grid arg $arg.")
@@ -1413,7 +1423,11 @@ function RecipesPipeline.preprocess_attributes!(plotattributes::AKW)
14131423
# handle individual axes font args
14141424
for letter in (:x, :y, :z)
14151425
for fontname in (:tickfont, :guidefont)
1416-
args = RecipesPipeline.pop_kw!(plotattributes, get_attr_symbol(letter, fontname), ())
1426+
args = RecipesPipeline.pop_kw!(
1427+
plotattributes,
1428+
get_attr_symbol(letter, fontname),
1429+
(),
1430+
)
14171431
for arg in wraptuple(args)
14181432
processFontArg!(plotattributes, get_attr_symbol(letter, fontname), arg)
14191433
end

Diff for: src/axes.jl

+7-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ function process_axis_arg!(plotattributes::AKW, arg, letter = "")
6868
elseif typeof(arg) <: Function
6969
plotattributes[get_attr_symbol(letter, :formatter)] = arg
7070

71-
elseif !handleColors!(plotattributes, arg, get_attr_symbol(letter, :foreground_color_axis))
71+
elseif !handleColors!(
72+
plotattributes,
73+
arg,
74+
get_attr_symbol(letter, :foreground_color_axis),
75+
)
7276
@warn("Skipped $(letter)axis arg $arg")
7377
end
7478
end
@@ -463,7 +467,8 @@ function expand_extrema!(sp::Subplot, plotattributes::AKW)
463467
# TODO: need more here... gotta track the discrete reference value
464468
# as well as any coord offset (think of boxplot shape coords... they all
465469
# correspond to the same x-value)
466-
plotattributes[letter], plotattributes[get_attr_symbol(letter, :(_discrete_indices))] =
470+
plotattributes[letter],
471+
plotattributes[get_attr_symbol(letter, :(_discrete_indices))] =
467472
discrete_value!(axis, data)
468473
expand_extrema!(axis, plotattributes[letter])
469474
end

Diff for: src/backends/pgfplotsx.jl

+13-14
Original file line numberDiff line numberDiff line change
@@ -950,21 +950,20 @@ function pgfx_font(fontsize::Nothing, thickness_scaling = 1, font = "\\selectfon
950950
end
951951

952952
function pgfx_should_add_to_legend(series::Series)
953-
series.plotattributes[:primary] &&
954-
!(
955-
series.plotattributes[:seriestype] in (
956-
:hexbin,
957-
:bins2d,
958-
:histogram2d,
959-
:hline,
960-
:vline,
961-
:contour,
962-
:contourf,
963-
:contour3d,
964-
:heatmap,
965-
:image,
966-
)
953+
series.plotattributes[:primary] && !(
954+
series.plotattributes[:seriestype] in (
955+
:hexbin,
956+
:bins2d,
957+
:histogram2d,
958+
:hline,
959+
:vline,
960+
:contour,
961+
:contourf,
962+
:contour3d,
963+
:heatmap,
964+
:image,
967965
)
966+
)
968967
end
969968

970969
function pgfx_marker(plotattributes, i = 1)

Diff for: src/backends/pyplot.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ end
6262

6363
for k in (:linthresh, :base, :label)
6464
# add PyPlot specific symbols to cache
65-
_attrsymbolcache[k] = Dict{Symbol, Symbol}()
65+
_attrsymbolcache[k] = Dict{Symbol,Symbol}()
6666
for letter in (:x, :y, :z, Symbol(""), :top, :bottom, :left, :right)
6767
_attrsymbolcache[k][letter] = Symbol(k, letter)
6868
end

Diff for: src/utils.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,7 @@ function mesh3d_triangles(x, y, z, cns)
12161216
end
12171217

12181218
# cache joined symbols so they can be looked up instead of constructed each time
1219-
const _attrsymbolcache = Dict{Symbol, Dict{Symbol, Symbol}}()
1219+
const _attrsymbolcache = Dict{Symbol,Dict{Symbol,Symbol}}()
12201220

12211221
get_attr_symbol(letter::Symbol, keyword::String) = get_attr_symbol(letter, Symbol(keyword))
12221222
get_attr_symbol(letter::Symbol, keyword::Symbol) = _attrsymbolcache[letter][keyword]

0 commit comments

Comments
 (0)