Vline and hline don't work with ticks=:native Plotly

It seems like vline and hline have problems with ticks=:native in Plotly.

using Plots
plotly()
plt1 = plot(ticks=:native)
plot!(plt1, [now()], [1])
vline!(plt1, [now()])

Doesn’t work but without the vline! it does. The error is:

Failed to show value:

InexactError: Int64(NaN)
  1. Int64 @ float.jl:812 [inlined]
  2. convert @ number.jl:7 [inlined]
  3. Millisecond @ types.jl:61 [inlined]
  4. UTM @ types.jl:103 [inlined]
  5. datetimeformatter @ recipes.jl:7 [inlined]

Similarly with hline which shouldn’t be affected by DateTime but seem to be affected by it.

Sounds like this bug here.

1 Like