Giter VIP home page Giter VIP logo

Comments (8)

dcjones avatar dcjones commented on May 16, 2024

It looks like that was as Iterators bug. I just updated Iterators to fix it. Try Pkg.update() and see if it did the trick.

from gadfly.jl.

swadey avatar swadey commented on May 16, 2024

Thanks, I did get further, but now I get this:

WARNING: has(d,k) is deprecated, use haskey(d,k) instead.                                            
 in render at /Users/swade/.julia/Gadfly/src/Gadfly.jl:401
 Error showing value of type Plot:          
ERROR: no method convert(Type{Take{Cycle{I}}},Take{Cycle{Array{String,1}}})        
  in setindex! at array.jl:403              
  in draw at /Users/swade/.julia/Compose/src/dataform.jl:108
  in draw at /Users/swade/.julia/Compose/src/form.jl:158
  in drawpart at /Users/swade/.julia/Compose/src/canvas.jl:315
  in draw at /Users/swade/.julia/Compose/src/canvas.jl:258
  in show at /Users/swade/.julia/Gadfly/src/Gadfly.jl:464
  in repl_show at repl.jl:12 

When I comment out bits of show() in Gadlfy.jl I then get this:

julia> p = plot(cars, x = "displ", y = "hwy", label = 3, Geom.point, Geom.label); draw(D3("cars.js", 6inch, 6inch), p)
ERROR: no method append!(PooledDataArray{UTF8String,Uint32,1},PooledDataArray{UTF8String,Uint32,1})
 in cat_aes_var! at /Users/swade/.julia/Gadfly/src/aesthetics.jl:197
 in cat at /Users/swade/.julia/Gadfly/src/aesthetics.jl:185
 in render at /Users/swade/.julia/Gadfly/src/Gadfly.jl:411
 in draw at /Users/swade/.julia/Gadfly/src/Gadfly.jl:448 

from gadfly.jl.

dcjones avatar dcjones commented on May 16, 2024

I think I've sorted it out. It should work with another update.

from gadfly.jl.

swadey avatar swadey commented on May 16, 2024

Wow that was fast. I'll give it a try shortly.

thanks,
wade

On Jun 29, 2013, at 2:30 PM, Daniel Jones [email protected] wrote:

I think I've sorted it out. It should work with another update.


Reply to this email directly or view it on GitHub.

from gadfly.jl.

swadey avatar swadey commented on May 16, 2024

I gave it a try but I think there's something else broken when labels are used:

ERROR: type: setfield: expected Union(Nothing,PooledDataArray{UTF8String,R,1}), got PooledDataArray{String,Uint32,1}
 in apply_scale at /Users/swade/.julia/Gadfly/src/scale.jl:337
 in apply_scales at /Users/swade/.julia/Gadfly/src/scale.jl:27
 in apply_scales at /Users/swade/.julia/Gadfly/src/scale.jl:43
 in render at /Users/swade/.julia/Gadfly/src/Gadfly.jl:398
 in draw at /Users/swade/.julia/Gadfly/src/Gadfly.jl:448

from gadfly.jl.

dcjones avatar dcjones commented on May 16, 2024

Thanks for all the help working out the bugs. Another update should do the trick.

from gadfly.jl.

swadey avatar swadey commented on May 16, 2024

Great. This seems to have fixed it! What heuristic do you use to decide which labels get displayed?

from gadfly.jl.

dcjones avatar dcjones commented on May 16, 2024

It does simulated annealing to try to maximize the number of visible labels. So basically it randomly repositions labels over many iterations and chooses the layout with the least overlaps, then hides overlapping labels.

This works reasonably well, but clearly still needs some tweaking and optimizing.

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.