Giter Club home page Giter Club logo

Comments (6)

dcjones avatar dcjones commented on May 23, 2024

Should work now. Thanks for reporting.

from gadfly.jl.

swadey avatar swadey commented on May 23, 2024

Thanks Daniel,

Unfortunately, I'm still having problems with this when I add data:

julia> layer(bbn[:(target .== true), :], Geom.line, x = "score")                                                                                           
ERROR: no method layer((Symbol,ASCIIString),DataFrame,BarGeometry)                                                                                         

julia> layer                                                                                                                                               
# methods for generic function layer                                                                                                                       
layer(data::Union(AbstractDataFrame,Nothing))                                                                                                              
layer(data::Union(AbstractDataFrame,Nothing),statistic::StatisticElement)                                                                                  
layer(data::Union(AbstractDataFrame,Nothing),statistic::StatisticElement,geom::GeometryElement) at /Users/swade/.julia/Gadfly/src/Gadfly.jl:75             
layer(statistic::StatisticElement,geom::GeometryElement) at /Users/swade/.julia/Gadfly/src/Gadfly.jl:82                                                    
layer(geom::GeometryElement) at /Users/swade/.julia/Gadfly/src/Gadfly.jl:87

Despite the method not showing up, I can see this in Gadfly.jl:

function layer(data::Union(AbstractDataFrame, Nothing),                                                                                                    
               statistic::StatisticElement=Stat.nil,                                                                                                       
               geom::GeometryElement=Geom.nil;                                                                                                             
               mapping...)                                                                                                                                 
    Layer(data, {k => v for (k, v) in mapping}, statistic, geom)                                                                                           
end 

from gadfly.jl.

dehann avatar dehann commented on May 23, 2024

Hi,

I had to index into the new layer being added to make this work on Julia 0.3.8 and Gadfly 0.3.12, also in IJulia notebook, Ubuntu 12.04.

p = plot(x=linspace(1,10,10), y=rand(10), Geom.line)
push!(p.layers, layer(x=linspace(1,10,10),y=rand(10),Geom.line)[1])

The error without indexing is:

convert has no method matching convert(::Type{Layer}, ::Array{Layer,1})

from gadfly.jl.

dcjones avatar dcjones commented on May 23, 2024

You can actually just say this now:

push!(p, layer(x=linspace(1,10,10),y=rand(10),Geom.line))

from gadfly.jl.

dehann avatar dehann commented on May 23, 2024

Thanks Daniel,

Maybe I'm just missing something obvious or on an older version than you, but I still get this after Pkg.update(). I misread the first argument at first, but now get this:

push! has no method matching push!(::Plot, ::Array{Layer,1})
while loading In[10], in expression starting on line 5

Never the less, I have it working with the [1] indexing.

Thanks

from gadfly.jl.

dcjones avatar dcjones commented on May 23, 2024

I hadn't tagged a new version since adding that feature. It should work after doing Pkg.update() now.

from gadfly.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.