Format .jl files [skip ci]
This commit is contained in:
parent
536712359c
commit
debc945027
@ -50,7 +50,8 @@ const _magic_axis_args = [:axis, :tickfont, :guidefont, :grid, :minorgrid]
|
|||||||
const _magic_subplot_args =
|
const _magic_subplot_args =
|
||||||
[:title_font, :legend_font, :legend_title_font, :plot_title_font, :colorbar_titlefont]
|
[:title_font, :legend_font, :legend_title_font, :plot_title_font, :colorbar_titlefont]
|
||||||
const _magic_series_args = [:line, :marker, :fill]
|
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_axis_args = sort(union([_axis_args; _magic_axis_args]))
|
||||||
const _all_subplot_args = sort(union([_subplot_args; _magic_subplot_args]))
|
const _all_subplot_args = sort(union([_subplot_args; _magic_subplot_args]))
|
||||||
|
|||||||
@ -90,9 +90,9 @@ function _preprocess_userrecipe(kw::AKW)
|
|||||||
kw[:ribbon] = map(rib, kw[:x])
|
kw[:ribbon] = map(rib, kw[:x])
|
||||||
end
|
end
|
||||||
# convert a ribbon into a fillrange
|
# convert a ribbon into a fillrange
|
||||||
if rib !== nothing
|
if rib !== nothing
|
||||||
make_fillrange_from_ribbon(kw)
|
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
|
elseif fr !== nothing && fr isa Function
|
||||||
kw[:fillrange] = map(fr, kw[:x])
|
kw[:fillrange] = map(fr, kw[:x])
|
||||||
end
|
end
|
||||||
@ -294,7 +294,8 @@ function _add_plot_title!(plt)
|
|||||||
the_layout = plt.layout
|
the_layout = plt.layout
|
||||||
vspan = plt[:plot_titlevspan]
|
vspan = plt[:plot_titlevspan]
|
||||||
plt.layout = grid(2, 1, heights = (vspan, 1 - vspan))
|
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
|
plt.layout.grid[2, 1] = the_layout
|
||||||
subplot.plt = plt
|
subplot.plt = plt
|
||||||
|
|
||||||
@ -428,4 +429,3 @@ function _add_the_series(plt, sp, plotattributes)
|
|||||||
_series_added(plt, series)
|
_series_added(plt, series)
|
||||||
_update_subplot_colorbars(sp)
|
_update_subplot_colorbars(sp)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@ empty!(PLOTS_DEFAULTS)
|
|||||||
Plots.__init__()
|
Plots.__init__()
|
||||||
|
|
||||||
@testset "default" begin
|
@testset "default" begin
|
||||||
default(fillrange=0)
|
default(fillrange = 0)
|
||||||
@test Plots._series_defaults[:fillrange] == 0
|
@test Plots._series_defaults[:fillrange] == 0
|
||||||
pl = plot(1:5)
|
pl = plot(1:5)
|
||||||
@test pl[1][1][:fillrange] == 0
|
@test pl[1][1][:fillrange] == 0
|
||||||
|
|||||||
@ -19,9 +19,8 @@ end
|
|||||||
end
|
end
|
||||||
|
|
||||||
@testset "Slicing" begin
|
@testset "Slicing" begin
|
||||||
|
|
||||||
@test plot(1:5, fillrange = 0)[1][1][:fillrange] == 0
|
@test plot(1:5, fillrange = 0)[1][1][:fillrange] == 0
|
||||||
data4 = rand(4,4)
|
data4 = rand(4, 4)
|
||||||
for i in axes(data4, 1)
|
for i in axes(data4, 1)
|
||||||
@test plot(data4, fillrange = 0)[1][i][:fillrange] == 0
|
@test plot(data4, fillrange = 0)[1][i][:fillrange] == 0
|
||||||
@test plot(data4, fillrange = [1, 2])[1][i][:fillrange] == [1.0, 2.0]
|
@test plot(data4, fillrange = [1, 2])[1][i][:fillrange] == [1.0, 2.0]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user