Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InexactError when using integers in Geom.ribbon #1477

Closed
jonathanBieler opened this issue Aug 24, 2020 · 1 comment · Fixed by #1478
Closed

InexactError when using integers in Geom.ribbon #1477

jonathanBieler opened this issue Aug 24, 2020 · 1 comment · Fixed by #1478

Comments

@jonathanBieler
Copy link
Contributor

This doesn't work with Gadfly 1.3 and Julia 1.5. It works if I use floats for y.
It used to work in previous versions I think.

using Gadfly
x = 1:4
plot(x=x, ymin = x, ymax = 2x, Geom.ribbon)

Error showing value of type Plot:
ERROR: InexactError: Int64(NaN)
Stacktrace:
 [1] Int64 at ./float.jl:710 [inlined]
 [2] convert at ./number.jl:7 [inlined]
 [3] convert at ./essentials.jl:310 [inlined] (repeats 2 times)
 [4] push! at ./array.jl:934 [inlined]
 [5] _collect(::Type{Tuple{Int64,Int64}}, ::Base.Iterators.Flatten{Tuple{Array{Tuple{Int64,Int64},1},Array{Tuple{Int64,Float64},1},Array{Tuple{Int64,Int64},1}}}, ::Base.SizeUnknown) at ./array.jl:590
 [6] collect(::Type{Tuple{Int64,Int64}}, ::Base.Iterators.Flatten{Tuple{Array{Tuple{Int64,Int64},1},Array{Tuple{Int64,Float64},1},Array{Tuple{Int64,Int64},1}}}) at ./array.jl:583
 [7] (::Gadfly.Geom.var"#163#167"{DataType,DataType,Dict{Tuple{ColorTypes.LCHab{Float32},Int64,Int64},Array{Tuple{Int64,Int64},1}},Dict{Tuple{ColorTypes.LCHab{Float32},Int64,Int64},Array{Tuple{Int64,Int64},1}}})(::Tuple{ColorTypes.LCHab{Float32},Int64,Int64}) at ./none:0
 [8] iterate at ./generator.jl:47 [inlined]
 [9] collect(::Base.Generator{Base.KeySet{Tuple{ColorTypes.LCHab{Float32},Int64,Int64},Dict{Tuple{ColorTypes.LCHab{Float32},Int64,Int64},Array{Tuple{Int64,Int64},1}}},Gadfly.Geom.var"#163#167"{DataType,DataType,Dict{Tuple{ColorTypes.LCHab{Float32},Int64,Int64},Array{Tuple{Int64,Int64},1}},Dict{Tuple{ColorTypes.LCHab{Float32},Int64,Int64},Array{Tuple{Int64,Int64},1}}}}) at ./array.jl:686
 [10] render(::Gadfly.Geom.RibbonGeometry, ::Theme, ::Gadfly.Aesthetics) at /Users/jbieler/.julia/packages/Gadfly/USbaq/src/geom/ribbon.jl:59
 [11] render(::Gadfly.Geom.RibbonGeometry, ::Theme, ::Gadfly.Aesthetics, ::Array{Gadfly.Aesthetics,1}, ::Array{Gadfly.Data,1}, ::Dict{Symbol,Gadfly.ScaleElement}) at /Users/jbieler/.julia/packages/Gadfly/USbaq/src/geometry.jl:45
 [12] (::Gadfly.var"#108#109"{Dict{Symbol,Gadfly.ScaleElement}})(::Tuple{Layer,Gadfly.Aesthetics,Array{Gadfly.Aesthetics,1},Array{Gadfly.Data,1},Theme}) at ./none:0
 [13] iterate at ./generator.jl:47 [inlined]
 [14] collect(::Base.Generator{Base.Iterators.Zip{Tuple{Array{Layer,1},Array{Gadfly.Aesthetics,1},Array{Array{Gadfly.Aesthetics,1},1},Array{Array{Gadfly.Data,1},1},Array{Theme,1}}},Gadfly.var"#108#109"{Dict{Symbol,Gadfly.ScaleElement}}}) at ./array.jl:686
 [15] render_prepared(::Plot, ::Gadfly.Coord.Cartesian, ::Gadfly.Aesthetics, ::Array{Gadfly.Aesthetics,1}, ::Array{Array{Gadfly.StatisticElement,1},1}, ::Array{Array{Gadfly.Aesthetics,1},1}, ::Array{Array{Gadfly.Data,1},1}, ::Dict{Symbol,Gadfly.ScaleElement}, ::Array{Gadfly.GuideElement,1}; table_only::Bool, dynamic::Bool) at /Users/jbieler/.julia/packages/Gadfly/USbaq/src/Gadfly.jl:824
 [16] render_prepared(::Plot, ::Gadfly.Coord.Cartesian, ::Gadfly.Aesthetics, ::Array{Gadfly.Aesthetics,1}, ::Array{Array{Gadfly.StatisticElement,1},1}, ::Array{Array{Gadfly.Aesthetics,1},1}, ::Array{Array{Gadfly.Data,1},1}, ::Dict{Symbol,Gadfly.ScaleElement}, ::Array{Gadfly.GuideElement,1}) at /Users/jbieler/.julia/packages/Gadfly/USbaq/src/Gadfly.jl:813
 [17] render(::Plot) at /Users/jbieler/.julia/packages/Gadfly/USbaq/src/Gadfly.jl:759
 [18] draw at /Users/jbieler/.julia/packages/Gadfly/USbaq/src/Gadfly.jl:864 [inlined]
 [19] display(::Gadfly.GadflyDisplay, ::MIME{Symbol("text/html")}, ::Plot) at /Users/jbieler/.julia/packages/Gadfly/USbaq/src/Gadfly.jl:1069
 [20] display(::Gadfly.GadflyDisplay, ::String, ::Any) at ./multimedia.jl:216
 [21] display(::Gadfly.GadflyDisplay, ::Plot) at /Users/jbieler/.julia/packages/Gadfly/USbaq/src/Gadfly.jl:1026
 [22] display(::Any) at ./multimedia.jl:328
 [23] #invokelatest#1 at ./essentials.jl:710 [inlined]
 [24] invokelatest at ./essentials.jl:709 [inlined]
 [25] print_response(::IO, ::Any, ::Bool, ::Bool, ::Any) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:238
 [26] print_response(::REPL.AbstractREPL, ::Any, ::Bool, ::Bool) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:223
 [27] (::REPL.var"#do_respond#54"{Bool,Bool,REPL.var"#64#73"{REPL.LineEditREPL,REPL.REPLHistoryProvider},REPL.LineEditREPL,REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:822
 [28] #invokelatest#1 at ./essentials.jl:710 [inlined]
 [29] invokelatest at ./essentials.jl:709 [inlined]
 [30] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/REPL/src/LineEdit.jl:2355
 [31] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:1143
 [32] (::REPL.var"#38#42"{REPL.LineEditREPL,REPL.REPLBackendRef})() at ./task.jl:356
@jonathanBieler
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant