JuliaGraphics / Winston.jl

2D plotting for Julia
MIT License
171 stars 55 forks source link

Plot() container not working? #243

Closed my-little-repository closed 9 years ago

my-little-repository commented 9 years ago

I am trying to use the Plot() container, as advertised on the wiki, but I get an error.

julia> let p = Plot(), x=linspace(-2pi,2pi,100)
           add(p, Curve(x, sin(x)))
           Winston.display(p) 
       end
ERROR: MethodError: `limits` has no method matching limits(::Winston.Plot)
Closest candidates are:
  limits(::Winston.Plot, !Matched::Graphics.BoundingBox)
  limits(::Any, !Matched::Any, !Matched::Any, !Matched::Any, !Matched::Any, !Matched::Any)
 in compose_interior at /home/yves/.julia/v0.4/Winston/src/Winston.jl:1447
 in page_compose at /home/yves/.julia/v0.4/Winston/src/Winston.jl:1848
 in page_compose at /home/yves/.julia/v0.4/Winston/src/Winston.jl:1836
 in anonymous at /home/yves/.julia/v0.4/Winston/src/tk.jl:27
 in display at /home/yves/.julia/v0.4/Winston/src/tk.jl:35
 in display at /home/yves/.julia/v0.4/Winston/src/Winston.jl:2855
 [inlined code] from multimedia.jl:151

What am I doing wrong?

mvkma commented 9 years ago

Try using FramedPlot() instead of Plot().

my-little-repository commented 9 years ago

I don't want a framed plot. I want a plot without a frame. From the doc, it seems that Plot() is the way to go.

mvkma commented 9 years ago

Okay, I'm sorry. Can you try, if bd3c9af0242585137968a77fe5975c4981239763 works for you?

my-little-repository commented 9 years ago

@slangangular Yes, it works, thanks.