Comments (6)
Should work now. Thanks for reporting.
from gadfly.jl.
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.
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.
You can actually just say this now:
push!(p, layer(x=linspace(1,10,10),y=rand(10),Geom.line))
from gadfly.jl.
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.
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)
- Gadfly not working for simple point plot HOT 2
- tests and building docs currently failing HOT 3
- typos HOT 3
- Question re wrapping Gadfly.jl functionality in Tidier.jl HOT 8
- Wrong x-axis upper limit with date ? HOT 6
- Please add a feature to vary the thickness of the line in Geom.line and Geom.path HOT 1
- Specifying number of ticks HOT 6
- trying to use `Stat.yticks` causes `MethodError`
- Gadfly histogram ignore the bincount (and how to remove background lines) HOT 2
- Gadfly pop up not working in Ubuntu - workaround HOT 1
- How to set the width of the bar? HOT 1
- How to supress output to stdout? HOT 8
- Zooming broken on faceted plots
- Hexbin plotting out of range
- tspan in svg output is malformated HOT 5
- colorkey min/max values HOT 1
- Can't add title to 2D function plot HOT 1
- Gadfly v1.4.0 ?
- SVG does not work with Gadfly 1.4.0 and Compose 0.9.5 HOT 6
- SVG generation has a XML mistake on tag <tspan>
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gadfly.jl.