code:
import Pkg
Pkg.add("IJulia")
Pkg.add("Plots")
using Plots
#X is a range from 1 to 10
local x = 1 : 10
local y = log10(1 + (1 / x));
plot(x, y)
Error:
MethodError: no method matching +(::Int64, ::LinearAlgebra.Transpose{Float64, Vector{Float64}})
For element-wise addition, use broadcasting with dot syntax: scalar .+ array
Closest candidates are:
+(::Any, ::Any, !Matched::Any, !Matched::Any...) at operators.jl:591
+(::T, !Matched::T) where T<:Union{Int128, Int16, Int32, Int64, Int8, UInt128, UInt16, UInt32, UInt64, UInt8} at int.jl:87
+(::Union{Int16, Int32, Int64, Int8}, !Matched::BigInt) at gmp.jl:537
...
Stacktrace:
[1] top-level scope
@ ~/Documents/benfordslaw/Benford's Law.ipynb:9