Thanks for the help. I am also on 1.3.2. Here is the error:
julia> Pkg.status("Gadfly")
Status `C:\Users\ajf\OneDrive\toolingForDS\Project.toml`
[c91e804a] Gadfly v1.3.2
julia> plot(π_X,-1,1) ## gives error
Error showing value of type Plot:
ERROR: MethodError: Cannot `convert` an object of type Nothing to an object of type Float64
Closest candidates are:
convert(::Type{T}, ::Ratios.SimpleRatio{S}) where {T<:AbstractFloat, S} at C:\Users\ajf\.julia\packages\Ratios\uRs4y\src\Ratios.jl:13
convert(::Type{T}, ::T) where T<:Number at number.jl:6
convert(::Type{T}, ::Number) where T<:Number at number.jl:7
...
Stacktrace:
[1] setindex!(::Array{Float64,1}, ::Nothing, ::Int64) at .\array.jl:847
[2] apply_statistic(::Gadfly.Stat.FunctionStatistic, ::Dict{Symbol,Gadfly.ScaleElement}, ::Gadfly.Coord.Cartesian, ::Gadfly.Aesthetics) at C:\Users\ajf\.julia\packages\Gadfly\nN3lf\src\statistics.jl:1446
[3] apply_statistics(::Array{Gadfly.StatisticElement,1}, ::Dict{Symbol,Gadfly.ScaleElement}, ::Gadfly.Coord.Cartesian, ::Gadfly.Aesthetics) at C:\Users\ajf\.julia\packages\Gadfly\nN3lf\src\statistics.jl:33
[4] render_prepare(::Plot) at C:\Users\ajf\.julia\packages\Gadfly\nN3lf\src\Gadfly.jl:680
[5] render(::Plot) at C:\Users\ajf\.julia\packages\Gadfly\nN3lf\src\Gadfly.jl:740
[6] draw at C:\Users\ajf\.julia\packages\Gadfly\nN3lf\src\Gadfly.jl:847 [inlined]
[7] show(::Base.GenericIOBuffer{Array{UInt8,1}}, ::MIME{Symbol("image/svg+xml")}, ::Plot) at C:\Users\ajf\.julia\packages\Gadfly\nN3lf\src\Gadfly.jl:945
[8] display(::VSCodeServer.InlineDisplay, ::MIME{Symbol("image/svg+xml")}, ::Plot) at c:\Users\ajf\.vscode\extensions\julialang.language-julia-1.1.37\scripts\packages\VSCodeServer\src\display.jl:0
[9] display(::VSCodeServer.InlineDisplay, ::String, ::Any) at .\multimedia.jl:216
[10] display(::VSCodeServer.InlineDisplay, ::Plot) at c:\Users\ajf\.vscode\extensions\julialang.language-julia-1.1.37\scripts\packages\VSCodeServer\src\display.jl:108
[11] display(::Any) at .\multimedia.jl:328
[12] #invokelatest#1 at .\essentials.jl:710 [inlined]
[13] invokelatest at .\essentials.jl:709 [inlined]
[14] print_response(::IO, ::Any, ::Bool, ::Bool, ::Any) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\REPL\src\REPL.jl:238
[15] print_response(::REPL.AbstractREPL, ::Any, ::Bool, ::Bool) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\REPL\src\REPL.jl:223
[16] (::REPL.var"#do_respond#54"{Bool,Bool,REPL.var"#64#73"{REPL.LineEditREPL,REPL.REPLHistoryProvider},REPL.LineEditREPL,REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\REPL\src\REPL.jl:822
[17] #invokelatest#1 at .\essentials.jl:710 [inlined]
[18] invokelatest at .\essentials.jl:709 [inlined]
[19] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\REPL\src\LineEdit.jl:2355
[20] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\REPL\src\REPL.jl:1144
[21] (::REPL.var"#38#42"{REPL.LineEditREPL,REPL.REPLBackendRef})() at .\task.jl:356
If I experiment with a pdf from the Distributions.jl package, things seem to work.
using Distributions
densFun = function(x::Real)
pdf(Beta(2,4),x)
end
plot(densFun,-1,2) ## this works