From debc945027f9996da7e9e3767593f8a21d5d704d Mon Sep 17 00:00:00 2001 From: t-bltg Date: Sun, 16 Jan 2022 00:12:51 +0000 Subject: [PATCH] Format .jl files [skip ci] --- src/consts.jl | 3 ++- src/pipeline.jl | 8 ++++---- test/test_defaults.jl | 2 +- test/test_pipeline.jl | 3 +-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/consts.jl b/src/consts.jl index 5d0996e4..a4072229 100644 --- a/src/consts.jl +++ b/src/consts.jl @@ -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])) diff --git a/src/pipeline.jl b/src/pipeline.jl index baaef6ab..c3a47cca 100644 --- a/src/pipeline.jl +++ b/src/pipeline.jl @@ -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 - diff --git a/test/test_defaults.jl b/test/test_defaults.jl index 38cc9c29..6ad49077 100644 --- a/test/test_defaults.jl +++ b/test/test_defaults.jl @@ -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 diff --git a/test/test_pipeline.jl b/test/test_pipeline.jl index 1bf3ae06..ec864bcf 100644 --- a/test/test_pipeline.jl +++ b/test/test_pipeline.jl @@ -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]