You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got a function that as an input takes a list of values and returns an array of functions that I'd like to plot with Gadfly. Everything works fine until I try to plot it in any of the y-scales, then suddenly no plots are produced.
Here's a MWE:
using Gadfly
function test_f(a)
return [x -> a[i]*x for i in 1:length(a)]
end
plot(test_f(1:10),1,2π) |> SVG("test.svg")
fails to produce any plots and gives the following error:
MethodError: no method matching log10(::getfield(Main, Symbol("##10#12")){Int64,UnitRange{Int64}})
Closest candidates are:
log10(!Matched::BigFloat) at mpfr.jl:671
log10(!Matched::Missing) at math.jl:1072
log10(!Matched::Complex{Float16}) at math.jl:1020
...
The text was updated successfully, but these errors were encountered:
So I did some more digging, and I could be wrong but I believe the issue is that Gadfly doesn't use the ∘ operator for applying the composite functions that come up in Gadfly.Scale.
For example:
f = log10(x->x^2)
would produce a similar error to the one I posted earlier. However:
I've got a function that as an input takes a list of values and returns an array of functions that I'd like to plot with Gadfly. Everything works fine until I try to plot it in any of the y-scales, then suddenly no plots are produced.
Here's a MWE:
produces:
test.pdf
However,
fails to produce any plots and gives the following error:
The text was updated successfully, but these errors were encountered: