diff --git a/src/Winston.jl b/src/Winston.jl index 293da38..0e18c73 100644 --- a/src/Winston.jl +++ b/src/Winston.jl @@ -1435,16 +1435,19 @@ function add(self::Plot, args::PlotComponent...) end function limits(self::Plot, window::BoundingBox) - return _limits(limits(self.content,window), getattr(self,"gutter"), - getattr(self,"xlog"), getattr(self,"ylog"), - getattr(self,"xrange"), getattr(self,"yrange")) + margin = getattr(self, :gutter) + xrange = getattr(self, :xrange) + yrange = getattr(self, :yrange) + xlog = getattr(self, :xlog) + ylog = getattr(self, :ylog) + limits(margin, xrange, yrange, xlog, ylog, self.content) end compose_interior(self::Plot, device::Renderer, region::BoundingBox) = compose_interior(self, device, region, nothing) function compose_interior(self::Plot, device, region, lmts) if is(lmts,nothing) - lmts = limits(self) + lmts = limits(self, region) end xlog = getattr(self,"xlog") ylog = getattr(self,"ylog") diff --git a/test/issues.jl b/test/issues.jl index f6d557d..b4fff34 100644 --- a/test/issues.jl +++ b/test/issues.jl @@ -6,7 +6,8 @@ export issue143, issue146a, issue146b, - issue176 + issue176, + issue243 function issue008() large = [i^4 + 1e12 for i in 1:10^3] @@ -45,3 +46,10 @@ function issue176() t[2,2] = imagesc((10,1), (10,1), z) t end + +function issue243() + p = Plot() + x = linspace(0, 2pi) + add(p, Curve(x, sin(x))) + p +end