{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaPlots/RecipesBase.jl/issues/19","repository_url":"https://api.github.com/repos/JuliaPlots/RecipesBase.jl","labels_url":"https://api.github.com/repos/JuliaPlots/RecipesBase.jl/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/JuliaPlots/RecipesBase.jl/issues/19/comments","events_url":"https://api.github.com/repos/JuliaPlots/RecipesBase.jl/issues/19/events","html_url":"https://github.com/JuliaPlots/RecipesBase.jl/issues/19","id":235262971,"number":19,"title":"Type Recipe with `plot([f,g], a, b)` notation","user":{"login":"jverzani","id":421708,"avatar_url":"https://avatars1.githubusercontent.com/u/421708?v=3","gravatar_id":"","url":"https://api.github.com/users/jverzani","html_url":"https://github.com/jverzani","followers_url":"https://api.github.com/users/jverzani/followers","following_url":"https://api.github.com/users/jverzani/following{/other_user}","gists_url":"https://api.github.com/users/jverzani/gists{/gist_id}","starred_url":"https://api.github.com/users/jverzani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jverzani/subscriptions","organizations_url":"https://api.github.com/users/jverzani/orgs","repos_url":"https://api.github.com/users/jverzani/repos","events_url":"https://api.github.com/users/jverzani/events{/privacy}","received_events_url":"https://api.github.com/users/jverzani/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-06-12T15:03:36Z","updated_at":"2017-06-12T15:52:58Z","closed_at":null,"body":"In `SymPy`, I had a recipe that used to work (quite awhile ago) to handle the case:\r\n\r\n```\r\nplot(Sym[x,x^2], a, b)\r\n```\r\n\r\nas though the symbolic expressions were functions. It was defined as:\r\n\r\n```\r\n@recipe f{S<:AbstractVector{Sym}}(::Type{S}, ss::S) = Function[lambdify(s) for s in ss]\r\n```\r\n\r\nThe rhs side basically makes a collection of functions to pass along.\r\n\r\nI can't figure out why this doesn't work. I suspect that the issue is in specifying the type to match in the `(::Type{S}, val::S)` part of the signature, but after trying several different things, am not so sure.\r\n\r\nThe debug info looks like:\r\n\r\n```\r\napply_recipe args: Any[:x, :y, :z]\r\napply_recipe args: Any[:(::Type{T}), :(v::T)]\r\napply_recipe args: Any[:(::Type{T}), :(v::T)]\r\napply_recipe args: Any[:(::Type{T}), :(v::T)]\r\napply_recipe args: Any[:(::Type{SliceIt}), :x, :y, :z]\r\n```\r\n\r\nI know I can get this done by `plot` and `plot!`, but it would be nice to have this working again if it is possible. Any help would be most appreciated."},"comment":{"url":"https://api.github.com/repos/JuliaPlots/RecipesBase.jl/issues/comments/307832404","html_url":"https://github.com/JuliaPlots/RecipesBase.jl/issues/19#issuecomment-307832404","issue_url":"https://api.github.com/repos/JuliaPlots/RecipesBase.jl/issues/19","id":307832404,"user":{"login":"mkborregaard","id":8429802,"avatar_url":"https://avatars1.githubusercontent.com/u/8429802?v=3","gravatar_id":"","url":"https://api.github.com/users/mkborregaard","html_url":"https://github.com/mkborregaard","followers_url":"https://api.github.com/users/mkborregaard/followers","following_url":"https://api.github.com/users/mkborregaard/following{/other_user}","gists_url":"https://api.github.com/users/mkborregaard/gists{/gist_id}","starred_url":"https://api.github.com/users/mkborregaard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkborregaard/subscriptions","organizations_url":"https://api.github.com/users/mkborregaard/orgs","repos_url":"https://api.github.com/users/mkborregaard/repos","events_url":"https://api.github.com/users/mkborregaard/events{/privacy}","received_events_url":"https://api.github.com/users/mkborregaard/received_events","type":"User","site_admin":false},"created_at":"2017-06-12T15:52:58Z","updated_at":"2017-06-12T15:52:58Z","body":"For the record, the type recipe gives the error\r\n```\r\nERROR: MethodError: no method matching min(::SymPy.Sym, ::Float64)\r\nYou may have intended to import Base.min\r\n```\r\nWhich is reproducible by\r\n```\r\nusing SymPy\r\n@vars x\r\np = Sym(x^2)\r\n\r\nf{S<:AbstractVector{Sym}}(::Type{S}, ss::S) = [lambdify(s) for s in ss]\r\nf([p,p]) #gives the same error message\r\n```\r\nwhereas\r\n```julia\r\nf(AbstractVector{Sym}, [p,p]) #the correct signature\r\n```\r\nworks. So it looks like the type recipe isn't passing this properly forward?\r\n\r\n"}}
{"actor":{"display_login":"mkborregaard"}}