{"action":"created","issue":{"url":"https://api.github.com/repos/dcjones/Gadfly.jl/issues/871","repository_url":"https://api.github.com/repos/dcjones/Gadfly.jl","labels_url":"https://api.github.com/repos/dcjones/Gadfly.jl/issues/871/labels{/name}","comments_url":"https://api.github.com/repos/dcjones/Gadfly.jl/issues/871/comments","events_url":"https://api.github.com/repos/dcjones/Gadfly.jl/issues/871/events","html_url":"https://github.com/dcjones/Gadfly.jl/issues/871","id":171925477,"number":871,"title":"both xlabel and ylabel with Geom.bar","user":{"login":"bjarthur","id":1538268,"avatar_url":"https://avatars.githubusercontent.com/u/1538268?v=3","gravatar_id":"","url":"https://api.github.com/users/bjarthur","html_url":"https://github.com/bjarthur","followers_url":"https://api.github.com/users/bjarthur/followers","following_url":"https://api.github.com/users/bjarthur/following{/other_user}","gists_url":"https://api.github.com/users/bjarthur/gists{/gist_id}","starred_url":"https://api.github.com/users/bjarthur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjarthur/subscriptions","organizations_url":"https://api.github.com/users/bjarthur/orgs","repos_url":"https://api.github.com/users/bjarthur/repos","events_url":"https://api.github.com/users/bjarthur/events{/privacy}","received_events_url":"https://api.github.com/users/bjarthur/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-18T15:11:04Z","updated_at":"2016-08-20T10:27:09Z","closed_at":null,"body":"Geom.bar works fine with either Guide.xlabel or Guide.ylabel, but not both.  Geom.line works in all cases.\r\n\r\n```\r\njulia> plot(x=1:10, y=1:10, Geom.bar, Guide.xlabel(\"foo\"))\r\n\r\njulia> plot(x=1:10, y=1:10, Geom.bar, Guide.ylabel(\"foo\"))\r\n\r\njulia> plot(x=1:10, y=1:10, Geom.bar, Guide.xlabel(\"foo\"), Guide.ylabel(\"foo\"))\r\nERROR: MethodError: Gadfly.#plot(::Array{Any,1}, ::Gadfly.#plot, ::Gadfly.Geom.#bar, ::Gadfly.Guide.XLabel, ::Gadfly.Guide.YLabel) is ambiguous. Candidates:\r\n  (::Gadfly.#kw##plot)(::Array{Any,1}, ::Gadfly.#plot, f::Function, a, b, elements::Union{DataType,Function,Gadfly.Element,Gadfly.Theme}...)\r\n  (::Gadfly.#kw##plot)(::Array{Any,1}, ::Gadfly.#plot, elements::Union{Array{Gadfly.Layer,1},Union{DataType,Function,Gadfly.Element,Gadfly.Theme}}...)\r\n\r\njulia> plot(x=1:10, y=1:10, Geom.line, Guide.xlabel(\"foo\"), Guide.ylabel(\"foo\"))\r\n```"},"comment":{"url":"https://api.github.com/repos/dcjones/Gadfly.jl/issues/comments/241192102","html_url":"https://github.com/dcjones/Gadfly.jl/issues/871#issuecomment-241192102","issue_url":"https://api.github.com/repos/dcjones/Gadfly.jl/issues/871","id":241192102,"user":{"login":"Mattriks","id":18226881,"avatar_url":"https://avatars.githubusercontent.com/u/18226881?v=3","gravatar_id":"","url":"https://api.github.com/users/Mattriks","html_url":"https://github.com/Mattriks","followers_url":"https://api.github.com/users/Mattriks/followers","following_url":"https://api.github.com/users/Mattriks/following{/other_user}","gists_url":"https://api.github.com/users/Mattriks/gists{/gist_id}","starred_url":"https://api.github.com/users/Mattriks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mattriks/subscriptions","organizations_url":"https://api.github.com/users/Mattriks/orgs","repos_url":"https://api.github.com/users/Mattriks/repos","events_url":"https://api.github.com/users/Mattriks/events{/privacy}","received_events_url":"https://api.github.com/users/Mattriks/received_events","type":"User","site_admin":false},"created_at":"2016-08-20T10:27:09Z","updated_at":"2016-08-20T10:27:09Z","body":"The issue is that `Geom.bar` can be misinterpreted as `Function` [Geom.bar](https://github.com/dcjones/Gadfly.jl/blob/master/src/geom/bar.jl), and not as an instance of the type `Gadfly.Geom.BarGeometry` as it should be interpreted. Here is an example:\r\n\r\n```julia\r\ntest(x::Function) = print(\"$x is a Function\")\r\ntest(Geom.bar)\r\ntest(Geom.bar())\r\n```\r\nSo the following should work:\r\n```julia\r\nplot(x=1:10, y=21:30, Geom.bar(), \r\nGuide.ylabel(\"ylabel\"), Guide.xlabel(\"xlabel\"))\r\n```\r\nbecause `Geom.bar()` is an instance of the type `Gadfly.Geom.BarGeometry` ."}}
{"actor":{"display_login":"Mattriks"}}