You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As shown in the docs, it's possible to draw unconnected segments in a single call by adding NaNs for segment breaks. Unfortunately, this fails with DateTime axes.
MethodError: no method matching value(::Float64)
Closest candidates are:value(::Base.Dates.Time) at dates/accessors.jl:46value(::Base.Dates.Period) at dates/periods.jl:4value(::Base.Dates.TimeType) at dates/accessors.jl:45
Stacktrace:
[1] collect_to!(::Array{Int64,1}, ::Base.Generator{Array{Any,1},Plots.##294#295}, ::Int64, ::Int64) at ./array.jl:508
[2] _collect(::Array{Any,1}, ::Base.Generator{Array{Any,1},Plots.##294#295}, ::Base.EltypeUnknown, ::Base.HasShape) at ./array.jl:489
[3] map(::Function, ::Array{Any,1}) at ./abstractarray.jl:1868
[4] _apply_type_recipe(::Dict{Symbol,Any}, ::Array{Any,1}) at /home/cedric/.julia/v0.6/Plots/src/series.jl:193
[5] macro expansion at /home/cedric/.julia/v0.6/Plots/src/series.jl:235 [inlined]
[6] apply_recipe(::Dict{Symbol,Any}, ::Array{Any,1}, ::Array{Any,1}) at /home/cedric/.julia/v0.6/RecipesBase/src/RecipesBase.jl:287
[7] _process_userrecipes(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Tuple{Array{Any,1},Array{Any,1}}) at /home/cedric/.julia/v0.6/Plots/src/pipeline.jl:81
[8] _plot!(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Tuple{Array{Any,1},Array{Any,1}}) at /home/cedric/.julia/v0.6/Plots/src/plot.jl:179
[9] #plot#192(::Array{Any,1}, ::Function, ::Array{Any,1}, ::Vararg{Array{Any,1},N} where N) at /home/cedric/.julia/v0.6/Plots/src/plot.jl:58
[10] (::RecipesBase.#kw##plot)(::Array{Any,1}, ::RecipesBase.#plot, ::Array{Any,1}, ::Array{Any,1}, ::Vararg{Array{Any,1},N} where N) at ./<missing>:0
[11] include_string(::String, ::String) at ./loading.jl:522
Similary for strings:
>plot([1,2,3, 3], ["A", "A", "B", NaN])
No user recipe defined for String
Stacktrace:
[1] convertToAnyVector(::String, ::Dict{Symbol,Any}) at /home/cedric/.julia/v0.6/Plots/src/series.jl:14
[2] copy!(::Array{Any,1}, ::Base.Generator{Array{Any,1},Plots.##203#205{Dict{Symbol,Any}}}) at ./abstractarray.jl:573
[3] convertToAnyVector(::Array{Any,1}, ::Dict{Symbol,Any}) at /home/cedric/.julia/v0.6/Plots/src/series.jl:58
[4] macro expansion at /home/cedric/.julia/v0.6/Plots/src/series.jl:132 [inlined]
[5] apply_recipe(::Dict{Symbol,Any}, ::Type{Plots.SliceIt}, ::Array{Int64,1}, ::Array{Any,1}, ::Void) at /home/cedric/.julia/v0.6/RecipesBase/src/RecipesBase.jl:287
[6] _process_userrecipes(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Tuple{Array{Int64,1},Array{Any,1}}) at /home/cedric/.julia/v0.6/Plots/src/pipeline.jl:81
[7] _plot!(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Tuple{Array{Int64,1},Array{Any,1}}) at /home/cedric/.julia/v0.6/Plots/src/plot.jl:179
The text was updated successfully, but these errors were encountered:
Maybe a longer term approach could be to allow passing Missing that would then be reinterpreted as NaN when the Dates are converted to Floats by the DateFormatter?
As shown in the docs, it's possible to draw unconnected segments in a single call by adding
NaN
s for segment breaks. Unfortunately, this fails with DateTime axes.gives
Similary for strings:
The text was updated successfully, but these errors were encountered: