Evaluate simple RNN in Julia Flux - julia

I'm trying to learn Recurrent Neural Networks (RNN) with Flux.jl in Julia by following along some tutorials, like Char RNN from the FluxML/model-zoo.
I managed to build and train a model containing some RNN cells, but am failing to evaluate the model after training.
Can someone point out what I'm missing for this code to evaluate a simple (untrained) RNN?
julia> using Flux
julia> simple_rnn = Flux.RNN(1, 1, (x -> x))
julia> simple_rnn.([1, 2, 3])
ERROR: MethodError: no method matching (::Flux.RNNCell{var"#1#2", Matrix{Float32}, Vector{Float32}, Matrix{Float32}})(::Matrix{Float32}, ::Int64)
Closest candidates are:
(::Flux.RNNCell{F, A, V, var"#s263"} where var"#s263"<:AbstractMatrix{T})(::Any, ::Union{AbstractMatrix{T}, AbstractVector{T}, Flux.OneHotArray}) where {F, A, V, T} at C:\Users\UserName\.julia\packages\Flux\6o4DQ\src\layers\recurrent.jl:83
Stacktrace:
[1] (::Flux.Recur{Flux.RNNCell{var"#1#2", Matrix{Float32}, Vector{Float32}, Matrix{Float32}}, Matrix{Float32}})(x::Int64)
# Flux C:\Users\UserName\.julia\packages\Flux\6o4DQ\src\layers\recurrent.jl:34
[2] _broadcast_getindex_evalf
# .\broadcast.jl:648 [inlined]
[3] _broadcast_getindex
# .\broadcast.jl:621 [inlined]
[4] getindex
# .\broadcast.jl:575 [inlined]
[5] copy
# .\broadcast.jl:922 [inlined]
[6] materialize(bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, Flux.Recur{Flux.RNNCell{var"#1#2", Matrix{Float32}, Vector{Float32}, Matrix{Float32}}, Matrix{Float32}}, Tuple{Vector{Int64}}})
# Base.Broadcast .\broadcast.jl:883
[7] top-level scope
# REPL[3]:1
[8] top-level scope
# C:\Users\UserName\.julia\packages\CUDA\LTbUr\src\initialization.jl:81
I'm using Julia 1.6.1 on Windows 10.

Turns out it's just a problem with the input type.
Doing something like this will work:
julia> v = Vector{Vector{Float32}}([[1], [2], [3]])
julia> simple_rnn.(v)
3-element Vector{Vector{Float32}}:
[9.731078]
[16.657223]
[28.398548]
I tried a lot of combinations until I found the working one. There is probably a way to automatically convert the input with some evaluation function.

Related

How to pass variable to a method which calls a macro in Julia

I'm trying to call this macro from within a method where the parameters to the macro are passed in to the method. It works fine when I call it directly but there is something about the macro expansion which is preventing the variables lat and lon from being correctly used in the macro.
The macro I'm calling is #select here: https://github.com/Alexander-Barth/NCDatasets.jl/blob/4e35e843a53cdcff7f7ef66ebc3ceab1ee1e860b/src/select.jl#L54-L168
and here is the function where the lat and lon variables are not being expanded correctly
function data_for_lat_lon(ds, region, lat_lon_pair)
println("have latlon piar ", lat_lon_pair)
lat = lat_lon_pair[1]
lon = lat_lon_pair[2]
data = []
if(ArchGDAL.contains(region[1], ArchGDAL.createpoint(lon, lat)))
println(lat, " ", lon)
#the below call fails when called in this way
single_lat_lon = NCDatasets.#select(ds, latitude==$lat && longitude==$lon)
for (varname, var) in single_lat_lon
if varname in ["latitude", "longitude", "time"]
continue
end
push!(var_names, varname)
push!(data, Array[single_lat_lon[varname]][1][:])
end
return reduce(hcat, data)'
end
end
This is the error & stack trace I get when calling it:
MethodError: no method matching (::NCDatasets.var"#154#155")(::Float64)
The applicable method may be too new: running in world age 32645, while current world is 32646.
Closest candidates are:
(::NCDatasets.var"#154#155")(::Any) at none:0 (method too new to be called from this world context.)
Stacktrace:
[1] _broadcast_getindex_evalf
# .\broadcast.jl:670 [inlined]
[2] _broadcast_getindex
# .\broadcast.jl:643 [inlined]
[3] getindex
# .\broadcast.jl:597 [inlined]
[4] copy
# .\broadcast.jl:899 [inlined]
[5] materialize
# .\broadcast.jl:860 [inlined]
[6] findall(testf::NCDatasets.var"#154#155", A::Vector{Float64})
# Base .\array.jl:2311
[7] macro expansion
# C:\Users\scott\.julia\packages\NCDatasets\sLdiM\src\select.jl:242 [inlined]
[8] data_for_lat_lon(ds::NCDatasets.MFDataset{DeferDataset, 1, String, NCDatasets.DeferAttributes, NCDatasets.DeferDimensions, NCDatasets.DeferGroups}, region::DataFrameRow{DataFrame, DataFrames.Index}, lat_lon_pair::Tuple{Float64, Float64})
# Main .\In[46]:8
[9] top-level scope
# .\In[50]:3
[10] eval
# .\boot.jl:368 [inlined]
[11] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
# Base .\loading.jl:1428
I'm fairly confident this has something to do with the concept of "hygiene" and variable expansion with a macro but I'm new enough to julia to not understand what needs to be done in my calling function to resolve this. I have reveiwed this question but am not sure it applies to this case: How to pass variable value to a macro in julia?
Thanks!
Turns out the issue was unrelated and was a known issue in julia: https://discourse.julialang.org/t/how-to-bypass-the-world-age-problem/7012

Julia plot hline! doesn't work with multiple threads

I have a simple simulation and I want to plot errors on 3 distinct figures. To speed things up I wanted to introduce a little bit of parallel computing.
Threads.#threads for i in 1:3
plt = plot(t, err[:, i], linecolor=:blue, label=[""], linewidth=3)
hline!(plt, [0], linestyle=:dash, linecolor=:black, label=[""])
xlabel!(L"t")
ylabel!(L"e_%$i")
savefig(plt, "fig/Staubli_Slotine_Li$i.pdf")
end
Everything stops working when I try running julia with -t3 flag
ERROR: LoadError: TaskFailedException
Stacktrace:
[1] wait
# ./task.jl:334 [inlined]
[2] threading_run(func::Function)
# Base.Threads ./threadingconstructs.jl:38
[3] top-level scope
# ./threadingconstructs.jl:97
nested task error: KeyError: key :annotations not found
Stacktrace:
[1] pop!(h::Dict{Symbol, Any}, key::Symbol)
# Base ./dict.jl:587
[2] pop_kw!(dd::RecipesPipeline.DefaultsDict, k::Symbol)
# RecipesPipeline ~/.julia/packages/RecipesPipeline/F2mWY/src/utils.jl:57
[3] _update_subplot_args(plt::Plots.Plot{Plots.PGFPlotsXBackend}, sp::Plots.Subplot{Plots.PGFPlotsXBackend}, plotattributes_in::Dict{Symbol, Any}, subplot_index::Int64, remove_pair::Bool)
# Plots ~/.julia/packages/Plots/nzdhU/src/args.jl:2058
[4] _subplot_setup(plt::Plots.Plot{Plots.PGFPlotsXBackend}, plotattributes::Dict{Symbol, Any}, kw_list::Vector{Dict{Symbol, Any}})
# Plots ~/.julia/packages/Plots/nzdhU/src/pipeline.jl:277
[5] plot_setup!(plt::Plots.Plot{Plots.PGFPlotsXBackend}, plotattributes::Dict{Symbol, Any}, kw_list::Vector{Dict{Symbol, Any}})
# Plots ~/.julia/packages/Plots/nzdhU/src/pipeline.jl:138
[6] recipe_pipeline!(plt::Any, plotattributes::Any, args::Any)
# RecipesPipeline ~/.julia/packages/RecipesPipeline/F2mWY/src/RecipesPipeline.jl:87
[7] _plot!(plt::Plots.Plot, plotattributes::Any, args::Any)
# Plots ~/.julia/packages/Plots/nzdhU/src/plot.jl:208
[8] plot!(::Plots.Plot; kw::Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}})
# Plots ~/.julia/packages/Plots/nzdhU/src/plot.jl:198
[9] plot!(; kw::Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}})
# Plots ~/.julia/packages/Plots/nzdhU/src/plot.jl:188
[10] #xlabel!#484
# ~/.julia/packages/Plots/nzdhU/src/shorthands.jl:416 [inlined]
[11] xlabel!
# ~/.julia/packages/Plots/nzdhU/src/shorthands.jl:416 [inlined]
[12] macro expansion
# ~/Documents/studia/master_thesis/master_thesis_code/sym_scripts/Staubli_Slotine_Li.jl:29 [inlined]
[13] (::var"#88#threadsfor_fun#1"{UnitRange{Int64}})(onethread::Bool)
# Main ./threadingconstructs.jl:85
[14] (::var"#88#threadsfor_fun#1"{UnitRange{Int64}})()
# Main ./threadingconstructs.jl:52
in expression starting at /home/jcebulsk/Documents/studia/master_thesis/master_thesis_code/sym_scripts/Staubli_Slotine_Li.jl:26
If I comment out hline! the script runs without any issue.
It looks like I can't have both hline and parallel operation.
On my machine I am getting an EXCEPTION_ACCESS_VIOLATION which is even uglier. For sure in your code xlabel!(L"t") and ylabel!(L"e_%$i") mutate the global state which is very bad for any kind parallelism and should be xlabel!(plt, L"t") and ylabel!(plt, L"e_%$i").
However, in many scenarios this might still not work because Plots.jl is also maintaining it's global state and it might be not thread safe. Hence the best way to go forward is through distributed computing:
using Distributed
addprocs(3)
#everywhere using Plots, LaTeXStrings
Distributed.#distributed for i in 1:3
plt = plot(t, err[:, i], linecolor=:blue, label=[""], linewidth=3)
hline!(plt, [0], linestyle=:dash, linecolor=:black, label=[""])
xlabel!(L"t")
ylabel!(L"e_%$i")
savefig(plt, "fig/Staubli_Slotine_Li$i.pdf")
end
Note that you will have a better performance if the plots are very complex as each of those subprocesses will experience the "Julia time to first plot" issue.
Hence before going multi-process you might want to parametrize the GR backend and see if the performance is sufficient:
using Plots
ENV["GKSwstype"]="nul" # this parameter significantly speeds up generation of GR-based plots
gr()

MethodError: no method matching isless(::Matrix{Float64}, ::Matrix{Float64})

Code - Quasi Newton Problem
This is the code for Quasi Newton Problem. For this, I am getting an error
MethodError: no method matching isless(::Matrix{Float64}, ::Matrix{Float64})
Closest candidates are:
isless(::Any, ::Missing) at missing.jl:88
isless(::Missing, ::Any) at missing.jl:87
Stacktrace:
[1] <(x::Matrix{Float64}, y::Matrix{Float64})
# Base .\operators.jl:279
[2] >(x::Matrix{Float64}, y::Matrix{Float64})
# Base .\operators.jl:305
[3] bracket_minimum(f::var"#45#46"{typeof(k), Matrix{Float64}, Matrix{Float64}}, x::Int64; s::Float64, k::Float64)
# Main .\In[122]:12
[4] bracket_minimum(f::Function, x::Int64) (repeats 2 times)
# Main .\In[122]:10
[5] line_search(f::typeof(k), x::Matrix{Float64}, d::Matrix{Float64})
# Main .\In[122]:35
[6] step!(M::BFGS, f::Function, βˆ‡f::typeof(l), x::Matrix{Float64})
# Main .\In[122]:48
[7] quasi_method(f::typeof(k), g::Function, x0::Matrix{Float64})
# Main .\In[122]:67
[8] top-level scope
# In[128]:3
[9] eval
# .\boot.jl:360 [inlined]
[10] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
# Base .\loading.jl:1116
I still couldn't figure what's the issue with line 10 and 12. So help me out here? Maybe it's due to Matrix we are using or some other issues, I couldn't debug.
You forgot to vectorize your code.
See the example below for reference:
julia> a=[1. 2.; 3. 4.]; b=[1. 3.; 5. 7.];
julia> a < b
ERROR: MethodError: no method matching isless(::Matrix{Float64}, ::Matrix{Float64})
Now let us add dot to vectorize:
julia> a .< b
2Γ—2 BitMatrix:
0 1
1 1
If you want to check if all elements are lower use all:
julia> all(a .< b)
false
In your code bracket_minimum does the comparison yc > yb and those values are matrices while your code expects scalars.

How to Histogram Unitful Units in Julia?

I am trying to figure out how to bin/histogram an array of data in Julia. I have an array of units from the Unitful.jl package and want to use Histogram from StatsBase to bin the data. The first error I got was an error saying there were no methods for log10 to use Unitful.FreeUnits so I wrote one. Now I get a dimensional error. I thought Unitful was just going to work with other stuff.. guess not. The following is where I am at.
using Unitful
using StatsBase
data = [rand()*100*1u"MHz" for x in 1:10000]
function Base.log10(x::Quantity{})
u = unit(x)
return log10(x.val)u
end
# eventually I want to define my bin width manually.. but this is a start.
fit(Histogram, data)
ERROR
ERROR: DimensionError: 0.0 and 0.8237981449864736 MHz are not dimensionally compatible.
Stacktrace:
[1] _lt at /home/mcamp/.julia/packages/Unitful/1t88N/src/quantities.jl:274 [inlined]
[2] <(::Quantity{Float64,NoDims,Unitful.FreeUnits{(),NoDims,nothing}}, ::Quantity{Float64,𝐓^-1,Unitful.FreeUnits{(MHz,),𝐓^-1,nothing}}) at /home/mcamp/.julia/packages/Unitful/1t88N/src/quantities.jl:264
[3] <(::Int64, ::Quantity{Float64,𝐓^-1,Unitful.FreeUnits{(MHz,),𝐓^-1,nothing}}) at /home/mcamp/.julia/packages/Unitful/1t88N/src/quantities.jl:266
[4] <=(::Int64, ::Quantity{Float64,𝐓^-1,Unitful.FreeUnits{(MHz,),𝐓^-1,nothing}}) at ./operators.jl:326
[5] >=(::Quantity{Float64,𝐓^-1,Unitful.FreeUnits{(MHz,),𝐓^-1,nothing}}, ::Int64) at ./operators.jl:350
[6] histrange(::Quantity{Float64,𝐓^-1,Unitful.FreeUnits{(MHz,),𝐓^-1,nothing}}, ::Quantity{Float64,𝐓^-1,Unitful.FreeUnits{(MHz,),𝐓^-1,nothing}}, ::Int64, ::Symbol) at /home/mcamp/.julia/packages/StatsBase/EA8Mh/src/hist.jl:51
[7] histrange(::Array{Quantity{Float64,𝐓^-1,Unitful.FreeUnits{(MHz,),𝐓^-1,nothing}},1}, ::Int64, ::Symbol) at /home/mcamp/.julia/packages/StatsBase/EA8Mh/src/hist.jl:39
[8] (::StatsBase.var"#127#128"{Symbol})(::Array{Quantity{Float64,𝐓^-1,Unitful.FreeUnits{(MHz,),𝐓^-1,nothing}},1}, ::Int64) at /home/mcamp/.julia/packages/StatsBase/EA8Mh/src/hist.jl:103
[9] map(::StatsBase.var"#127#128"{Symbol}, ::Tuple{Array{Quantity{Float64,𝐓^-1,Unitful.FreeUnits{(MHz,),𝐓^-1,nothing}},1}}, ::Tuple{Int64}) at ./tuple.jl:176
[10] histrange(::Tuple{Array{Quantity{Float64,𝐓^-1,Unitful.FreeUnits{(MHz,),𝐓^-1,nothing}},1}}, ::Tuple{Int64}, ::Symbol) at /home/mcamp/.julia/packages/StatsBase/EA8Mh/src/hist.jl:102
[11] fit(::Type{Histogram{Int64,N,E} where E where N}, ::Tuple{Array{Quantity{Float64,𝐓^-1,Unitful.FreeUnits{(MHz,),𝐓^-1,nothing}},1}}; closed::Symbol, nbins::Int64) at /home/mcamp/.julia/packages/StatsBase/EA8Mh/src/hist.jl:332
[12] fit(::Type{Histogram{Int64,N,E} where E where N}, ::Array{Quantity{Float64,𝐓^-1,Unitful.FreeUnits{(MHz,),𝐓^-1,nothing}},1}; closed::Symbol, nbins::Int64) at /home/mcamp/.julia/packages/StatsBase/EA8Mh/src/hist.jl:276
[13] fit(::Type{Histogram{Int64,N,E} where E where N}, ::Array{Quantity{Float64,𝐓^-1,Unitful.FreeUnits{(MHz,),𝐓^-1,nothing}},1}) at /home/mcamp/.julia/packages/StatsBase/EA8Mh/src/hist.jl:276
[14] fit(::Type{Histogram}, ::Array{Quantity{Float64,𝐓^-1,Unitful.FreeUnits{(MHz,),𝐓^-1,nothing}},1}; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/mcamp/.julia/packages/StatsBase/EA8Mh/src/hist.jl:383
[15] fit(::Type{Histogram}, ::Array{Quantity{Float64,𝐓^-1,Unitful.FreeUnits{(MHz,),𝐓^-1,nothing}},1}) at /home/mcamp/.julia/packages/StatsBase/EA8Mh/src/hist.jl:383
[16] top-level scope at REPL[183]:1
[17] run_repl(::REPL.AbstractREPL, ::Any) at /build/julia/src/julia-1.5.3/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:288
[EDITED because I misunderstood the question]
Are you looking to plot a histogram of the data? If yes, instead of StatsBase.jl, I would use the histogram function of a plotting package like Plots.jl. For instance, to combine plots from Plots.jl with units from Unitful.jl, you can use the UnitfulRecipes.jl package. See this MWE that may be what you are after:
using Unitful: MHz
using Plots
using UnitfulRecipes
data = 100 * exp.(randn(10000)) * MHz
histogram(data)
will output
[BEFORE EDIT]
I don't think it makes sense mathematically or physically to take the logarithm of a non-nondimensional variable (i.e., a variable with a unit). That is, your redefinition of log10 is not a good idea IMHO. Instead, I would non-dimensionalize the data before taking the log, with something similar to
using Unitful: MHz
using StatsBase
data = 100 * rand(10000) * MHz
data_nodim = log10.(data / MHz) # <- this is valid
fit(Histogram, data_nodim) # <- this is valid too

Cannot convert DataFrame to series data for plotting in julia

I'm learning julia from https://docs.juliaplots.org/latest/basics/
Here is the julia code
using Plots,UnicodePlots,RDatasets
unicodeplots()
v=dataset("Ecdat","Airline")
typeof(v)
plot(v, :Cost) # this line will produce the error
plot(v) # this line will produce the error, too
I got
ERROR: Cannot convert DataFrame to series data for plotting
Stacktrace:
[1] prepareSeriesData(::DataFrame) at /home/dlin/.julia/packages/Plots/qZHsp/src/series.jl:14
[2] convertToAnyVector(::DataFrame, ::Dict{Symbol,Any}) at /home/dlin/.julia/packages/Plots/qZHsp/src/series.jl:26
[3] macro expansion at /home/dlin/.julia/packages/Plots/qZHsp/src/series.jl:130 [inlined]
[4] apply_recipe(::Dict{Symbol,Any}, ::Type{Plots.SliceIt}, ::Nothing, ::DataFrame, ::Nothing) at /home/dlin/.julia/packages/RecipesBase/zBoFG/src/RecipesBase.jl:275
[5] _process_userrecipes(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Tuple{DataFrame}) at /home/dlin/.julia/packages/Plots/qZHsp/src/pipeline.jl:83
[6] _plot!(::Plots.Plot{Plots.GRBackend}, ::Dict{Symbol,Any}, ::Tuple{DataFrame}) at /home/dlin/.julia/packages/Plots/qZHsp/src/plot.jl:178
[7] #plot#138(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(plot), ::DataFrame) at /home/dlin/.julia/packages/Plots/qZHsp/src/plot.jl:57
[8] plot(::DataFrame) at /home/dlin/.julia/packages/Plots/qZHsp/src/plot.jl:51
[9] top-level scope at REPL[4]:1
In the code of series.jl, it is
prepareSeriesData(x) = error("Cannot convert $(typeof(x)) to series data for plotting")
How to correct this?
What about simply using plot(v.Cost):
julia> plot(v.Cost)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
4.88870026e6 │⠀⑇⠀⠀⠀⠀⠀⠀⠀⠀⣠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ y1
│⠀⑇⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠀⑇⠀⠀⠀⠀⠀⠀⠀⒰Ⓓ⠀⠀⠀⠀⠀⠀⠀⠀⒀⑄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
β”‚β €β‘‡β €β €β €β €β €β €β €β‘Žβ’Έβ €β €β €β €β €β €β €β €β‘Έβ‘‡β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β”‚
β”‚β €β‘‡β €β €β €β €β €β’€β Žβ €β’Έβ €β €β €β €β €β €β €β’ β ƒβ‘‡β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β”‚
│⠀⑇⠀⠀⠀⠀⠀Ⓒ⠀⠀Ⓒ⠀⠀⠀⠀⠀⠀⠀⑇⠀⑇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
β”‚β €β‘‡β €β €β €β €β €β‘Žβ €β €β’Έβ €β €β €β €β €β €β’Έβ €β €β‘‡β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β”‚
β”‚β €β‘‡β €β €β €β €β €β‘‡β €β €β’Έβ €β €β €β €β €β €β‘Žβ €β €β‘‡β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β”‚
│⠀⑇⠀⠀⠀⠀⒰⠁⠀⠀Ⓒ⠀⠀⠀⠀⠀⠀⑇⠀⠀⑇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠀⑇⠀⠀⠀⠀⑸⠀⠀⠀Ⓒ⠀⠀⠀⠀⠀⒰⠁⠀⠀⑇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠀⑇⠀⠀⠀⒀⠇⠀⠀⠀Ⓒ⠀⠀⠀⠀⠀Ⓒ⠀⠀⠀⑇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
β”‚β €β‘‡β €β €β €β‘Όβ €β €β €β €β ˆβ‘†β €β €β €β €β‘‡β €β €β €β’£β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β”‚
│⠀⑇⠀⠀⑰⠁⠀⠀⠀⠀⠀⑇⠀⠀⠀⒰⠁⠀⠀⠀Ⓒ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠀⑇⠀⑰⠁⠀⠀⠀⠀⠀⠀⑇⠀⠀⒠⠇⠀⠀⠀⠀Ⓒ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⑀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
β”‚β €β‘‡β‘°β β €β €β €β €β €β €β €β‘‡β €β’€β ‡β €β €β €β €β €β’Έβ €β €β €β €β €β €β €β €β£€β €β €β €β €β €β €β €β’€β œβ‘‡β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β”‚
β”‚β €β‘β €β €β €β €β €β €β €β €β €β‘‡β €β‘Žβ €β €β €β €β €β €β’Έβ €β €β €β €β €β’€β œβ Šβ’Έβ €β €β €β €β €β €β’€β Žβ €β‘‡β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β‘„β €β”‚
β”‚β €β‘‡β €β €β €β €β €β €β €β €β €β‘‡β‘Όβ €β €β €β €β €β €β €β’Έβ €β €β €β €β’ β ‹β €β €β’Έβ €β €β €β €β €β €β‘Žβ €β €β’±β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β‘œβ €β €β”‚
β”‚β €β‘‡β €β €β €β €β €β €β €β €β €β ‹β €β €β €β €β €β €β €β €β’Έβ €β €β‘ β ’β β €β €β €β €β‘‡β €β €β €β’€β œβ €β €β €β’Έβ €β €β €β €β €β €β‘ β ”β’²β €β €β €β €β €β €β €β‘”β β €β €β”‚
β”‚β €β‘‡β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β Έβ ’β Šβ €β €β €β €β €β €β €β‘‡β‘ β –β ‰β β €β €β €β €β’Έβ €β €β €β’€β‘ β ’β β €β ˆβ‘†β €β €β €β €β‘ β Žβ €β €β €β €β”‚
-71402.26000000001 │⠀⑧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠭⠀⠀⠀⠀⠀⠀⠀⠀⠼⠢⠾⠭β ₯β €β €β €β €β €β ·β Άβ Ύβ ­β ­β €β €β €β €β €β €β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
-1.67 92.67
That part of the docs might be outdated. You have to use StatsPlots and the #df macro to get the desired behavior.
julia> using StatsPlots
julia> #df v plot(:Cost)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
4.88870026e6 │⠀⑇⠀⠀⠀⠀⠀⠀⠀⠀⣠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│ y1
│⠀⑇⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠀⑇⠀⠀⠀⠀⠀⠀⠀⒰Ⓓ⠀⠀⠀⠀⠀⠀⠀⠀⒀⑄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
β”‚β €β‘‡β €β €β €β €β €β €β €β‘Žβ’Έβ €β €β €β €β €β €β €β €β‘Έβ‘‡β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β”‚
β”‚β €β‘‡β €β €β €β €β €β’€β Žβ €β’Έβ €β €β €β €β €β €β €β’ β ƒβ‘‡β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β”‚
│⠀⑇⠀⠀⠀⠀⠀Ⓒ⠀⠀Ⓒ⠀⠀⠀⠀⠀⠀⠀⑇⠀⑇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
β”‚β €β‘‡β €β €β €β €β €β‘Žβ €β €β’Έβ €β €β €β €β €β €β’Έβ €β €β‘‡β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β”‚
β”‚β €β‘‡β €β €β €β €β €β‘‡β €β €β’Έβ €β €β €β €β €β €β‘Žβ €β €β‘‡β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β”‚
│⠀⑇⠀⠀⠀⠀⒰⠁⠀⠀Ⓒ⠀⠀⠀⠀⠀⠀⑇⠀⠀⑇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠀⑇⠀⠀⠀⠀⑸⠀⠀⠀Ⓒ⠀⠀⠀⠀⠀⒰⠁⠀⠀⑇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠀⑇⠀⠀⠀⒀⠇⠀⠀⠀Ⓒ⠀⠀⠀⠀⠀Ⓒ⠀⠀⠀⑇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
β”‚β €β‘‡β €β €β €β‘Όβ €β €β €β €β ˆβ‘†β €β €β €β €β‘‡β €β €β €β’£β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β”‚
│⠀⑇⠀⠀⑰⠁⠀⠀⠀⠀⠀⑇⠀⠀⠀⒰⠁⠀⠀⠀Ⓒ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠀⑇⠀⑰⠁⠀⠀⠀⠀⠀⠀⑇⠀⠀⒠⠇⠀⠀⠀⠀Ⓒ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⑀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
β”‚β €β‘‡β‘°β β €β €β €β €β €β €β €β‘‡β €β’€β ‡β €β €β €β €β €β’Έβ €β €β €β €β €β €β €β €β£€β €β €β €β €β €β €β €β’€β œβ‘‡β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β”‚
β”‚β €β‘β €β €β €β €β €β €β €β €β €β‘‡β €β‘Žβ €β €β €β €β €β €β’Έβ €β €β €β €β €β’€β œβ Šβ’Έβ €β €β €β €β €β €β’€β Žβ €β‘‡β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β‘„β €β”‚
β”‚β €β‘‡β €β €β €β €β €β €β €β €β €β‘‡β‘Όβ €β €β €β €β €β €β €β’Έβ €β €β €β €β’ β ‹β €β €β’Έβ €β €β €β €β €β €β‘Žβ €β €β’±β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β‘œβ €β €β”‚
β”‚β €β‘‡β €β €β €β €β €β €β €β €β €β ‹β €β €β €β €β €β €β €β €β’Έβ €β €β‘ β ’β β €β €β €β €β‘‡β €β €β €β’€β œβ €β €β €β’Έβ €β €β €β €β €β €β‘ β ”β’²β €β €β €β €β €β €β €β‘”β β €β €β”‚
β”‚β €β‘‡β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β €β Έβ ’β Šβ €β €β €β €β €β €β €β‘‡β‘ β –β ‰β β €β €β €β €β’Έβ €β €β €β’€β‘ β ’β β €β ˆβ‘†β €β €β €β €β‘ β Žβ €β €β €β €β”‚
-71402.26000000001 │⠀⑧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠭⠀⠀⠀⠀⠀⠀⠀⠀⠼⠢⠾⠭β ₯β €β €β €β €β €β ·β Άβ Ύβ ­β ­β €β €β €β €β €β €β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
-1.67 92.67
This is explained in later sections of the manual: https://docs.juliaplots.org/latest/input_data/#dataframes-support

Resources