Format .jl files [skip ci] (#4042)

Co-authored-by: t-bltg <t-bltg@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2022-01-17 12:50:54 +01:00 committed by GitHub
parent 536712359c
commit 1f49839529
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -50,7 +50,8 @@ const _magic_axis_args = [:axis, :tickfont, :guidefont, :grid, :minorgrid]
const _magic_subplot_args =
[:title_font, :legend_font, :legend_title_font, :plot_title_font, :colorbar_titlefont]
const _magic_series_args = [:line, :marker, :fill]
const _all_magic_args = sort(union(_magic_axis_args, _magic_series_args, _magic_subplot_args))
const _all_magic_args =
sort(union(_magic_axis_args, _magic_series_args, _magic_subplot_args))
const _all_axis_args = sort(union([_axis_args; _magic_axis_args]))
const _all_subplot_args = sort(union([_subplot_args; _magic_subplot_args]))

View File

@ -90,9 +90,9 @@ function _preprocess_userrecipe(kw::AKW)
kw[:ribbon] = map(rib, kw[:x])
end
# convert a ribbon into a fillrange
if rib !== nothing
if rib !== nothing
make_fillrange_from_ribbon(kw)
# map fillrange if it's a Function
# map fillrange if it's a Function
elseif fr !== nothing && fr isa Function
kw[:fillrange] = map(fr, kw[:x])
end
@ -294,7 +294,8 @@ function _add_plot_title!(plt)
the_layout = plt.layout
vspan = plt[:plot_titlevspan]
plt.layout = grid(2, 1, heights = (vspan, 1 - vspan))
plt.layout.grid[1, 1] = subplot = Subplot(plt.backend, parent = plt.layout[1, 1])
plt.layout.grid[1, 1] =
subplot = Subplot(plt.backend, parent = plt.layout[1, 1])
plt.layout.grid[2, 1] = the_layout
subplot.plt = plt
@ -428,4 +429,3 @@ function _add_the_series(plt, sp, plotattributes)
_series_added(plt, series)
_update_subplot_colorbars(sp)
end

View File

@ -13,7 +13,7 @@ empty!(PLOTS_DEFAULTS)
Plots.__init__()
@testset "default" begin
default(fillrange=0)
default(fillrange = 0)
@test Plots._series_defaults[:fillrange] == 0
pl = plot(1:5)
@test pl[1][1][:fillrange] == 0

View File

@ -19,9 +19,8 @@ end
end
@testset "Slicing" begin
@test plot(1:5, fillrange = 0)[1][1][:fillrange] == 0
data4 = rand(4,4)
data4 = rand(4, 4)
for i in axes(data4, 1)
@test plot(data4, fillrange = 0)[1][i][:fillrange] == 0
@test plot(data4, fillrange = [1, 2])[1][i][:fillrange] == [1.0, 2.0]