From bd3c9af0242585137968a77fe5975c4981239763 Mon Sep 17 00:00:00 2001 From: slangangular Date: Sat, 17 Oct 2015 10:36:33 +0200 Subject: [PATCH 1/2] Fix #243 --- src/Winston.jl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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") From 005e060dced94801f6d7156e620bea1857672bc4 Mon Sep 17 00:00:00 2001 From: slangangular Date: Fri, 23 Oct 2015 14:55:00 +0200 Subject: [PATCH 2/2] Test for #243 --- test/issues.jl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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