Fix ribbon slicing (#4068)
* move ribbon handling after slicing * format file
This commit is contained in:
+10
-3
@@ -21,9 +21,16 @@ end
|
||||
@testset "Slicing" begin
|
||||
@test plot(1:5, fillrange = 0)[1][1][:fillrange] == 0
|
||||
data4 = rand(4, 4)
|
||||
mat = reshape(1:8, 2, 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]
|
||||
@test plot(data4, fillrange = [1 2])[1][i][:fillrange] == (iseven(i) ? 2 : 1)
|
||||
for attribute in (:fillrange, :ribbon)
|
||||
@test plot(data4; NamedTuple{tuple(attribute)}(0)...)[1][i][attribute] == 0
|
||||
@test plot(data4; NamedTuple{tuple(attribute)}(Ref([1, 2]))...)[1][i][attribute] ==
|
||||
[1.0, 2.0]
|
||||
@test plot(data4; NamedTuple{tuple(attribute)}(Ref([1 2]))...)[1][i][attribute] ==
|
||||
(iseven(i) ? 2 : 1)
|
||||
@test plot(data4; NamedTuple{tuple(attribute)}(Ref(mat))...)[1][i][attribute] ==
|
||||
[2(i - 1) + 1, 2i]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user