Added tests for plots where xlims are Dates and DateTimes
This commit is contained in:
parent
4c95ca5089
commit
de03c3bca8
@ -14,3 +14,19 @@ using Plots, Test, Dates
|
|||||||
@test Plots.ylims(p) == ref_ylims
|
@test Plots.ylims(p) == ref_ylims
|
||||||
@test Plots.xlims(p) == ref_xlims
|
@test Plots.xlims(p) == ref_xlims
|
||||||
end # testset
|
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