Added tests for plots where xlims are Dates and DateTimes
This commit is contained in:
parent
02008284aa
commit
cd450f49d4
@ -14,3 +14,19 @@ using Plots, Test, Dates
|
||||
@test Plots.ylims(p) == ref_ylims
|
||||
@test Plots.xlims(p) == ref_xlims
|
||||
end # testset
|
||||
|
||||
@testset "Date xlims" begin
|
||||
y=[1.0*i*i for i in 1:10]
|
||||
x=[Date(2019,11,i) for i in 1:10]
|
||||
span = (Date(2019,10,31), Date(2019,11,11))
|
||||
|
||||
p = plot(x,y, xlims=span, widen = false)
|
||||
end # testset
|
||||
|
||||
@testset "DateTime xlims" begin
|
||||
y=[1.0*i*i for i in 1:10]
|
||||
x=[DateTime(2019,11,i,11) for i in 1:10]
|
||||
span = (DateTime(2019,10,31,11,59,59), DateTime(2019,11,11,12,01,15))
|
||||
|
||||
p = plot(x,y, xlims=span, widen = false)
|
||||
end # testset
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user