I am trying to plot a Vector of arrays,
θₜ=Vector{Float64}[]
It has 29 arrays of 100 elements each, and when I try to plot using the following, it throws an error:
using Plots
plot(1:1:29,θₜ[1:1:29],legend=false)
Error showing value of type Plots.Plot{Plots.GRBackend}:
ERROR: BoundsError: attempt to access 29-element Array{Float64,1} at index [1:100]
Stacktrace:
[1] throw_boundserror(::Array{Float64,1}, ::Tuple{UnitRange{Int64}}) at ./abstractarray.jl:538
[2] checkbounds at ./abstractarray.jl:503 [inlined]
[3] getindex(::Array{Float64,1}, ::UnitRange{Int64}) at ./array.jl:750
[4] gr_display(::Plots.Subplot{Plots.GRBackend}, ::Measures.Length{:mm,Float64}, ::Measures.Length{:mm,Float64}, ::Array{Float64,1}) at /Users/narayanivedam/.julia/packages/Plots/2KhB2/src/backends/gr.jl:1266
[5] gr_display(::Plots.Plot{Plots.GRBackend}, ::String) at /Users/narayanivedam/.julia/packages/Plots/2KhB2/src/backends/gr.jl:672
[6] _show(::IOContext{Base64.Base64EncodePipe}, ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.GRBackend}) at /Users/narayanivedam/.julia/packages/Plots/2KhB2/src/backends/gr.jl:1582
[7] _showjuno at /Users/narayanivedam/.julia/packages/Plots/2KhB2/src/output.jl:267 [inlined]
[8] showjuno(::IOContext{Base64.Base64EncodePipe}, ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.GRBackend}) at /Users/narayanivedam/.julia/packages/Plots/2KhB2/src/output.jl:249
[9] show(::IOContext{Base64.Base64EncodePipe}, ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.GRBackend}) at /Users/narayanivedam/.julia/packages/Plots/2KhB2/src/output.jl:196
[10] #base64encode#3(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::typeof(Base64.base64encode), ::Function, ::MIME{Symbol("image/png")}, ::Vararg{Any,N} where N) at /Users/sabae/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Base64/src/encode.jl:208
[11] #base64encode at ./none:0 [inlined]
[12] _binstringmime at /Users/sabae/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Base64/src/Base64.jl:46 [inlined]
[13] #stringmime#6(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::typeof(Base64.stringmime), ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.GRBackend}) at /Users/sabae/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Base64/src/Base64.jl:43
[14] (::Base64.var"#kw##stringmime")(::NamedTuple{(:context,),Tuple{IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}}}, ::typeof(Base64.stringmime), ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.GRBackend}) at ./none:0
[15] #stringmime#7(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::typeof(Base64.stringmime), ::String, ::Plots.Plot{Plots.GRBackend}) at /Users/sabae/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Base64/src/Base64.jl:44
[16] #stringmime at ./none:0 [inlined]
[17] displayinplotpane(::Plots.Plot{Plots.GRBackend}) at /Users/narayanivedam/.julia/packages/Atom/lBERI/src/display/showdisplay.jl:78
[18] display(::Atom.JunoDisplay, ::Plots.Plot{Plots.GRBackend}) at /Users/narayanivedam/.julia/packages/Atom/lBERI/src/display/showdisplay.jl:112
[19] display(::Any) at ./multimedia.jl:323
[20] #invokelatest#1 at ./essentials.jl:709 [inlined]
[21] invokelatest at ./essentials.jl:708 [inlined]
[22] print_response(::IO, ::Any, ::Bool, ::Bool, ::Any) at /Users/sabae/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/REPL/src/REPL.jl:156
[23] print_response(::REPL.AbstractREPL, ::Any, ::Bool, ::Bool) at /Users/sabae/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/REPL/src/REPL.jl:141
[24] (::REPL.var"#do_respond#38"{Bool,Atom.var"#176#177",REPL.LineEditREPL,REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at /Users/sabae/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/REPL/src/REPL.jl:719
[25] #invokelatest#1 at ./essentials.jl:709 [inlined]
[26] invokelatest at ./essentials.jl:708 [inlined]
[27] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /Users/sabae/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/REPL/src/LineEdit.jl:2306
[28] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /Users/sabae/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/REPL/src/REPL.jl:1045
[29] run_repl(::REPL.AbstractREPL, ::Any) at /Users/sabae/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/REPL/src/REPL.jl:201
[30] (::Base.var"#770#772"{Bool,Bool,Bool,Bool})(::Module) at ./client.jl:382
[31] #invokelatest#1 at ./essentials.jl:709 [inlined]
[32] invokelatest at ./essentials.jl:708 [inlined]
[33] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:366
[34] exec_options(::Base.JLOptions) at ./client.jl:304
[35] _start() at ./client.jl:460
What am I doing wrong?