Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/Winston.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
10 changes: 9 additions & 1 deletion test/issues.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ export
issue143,
issue146a,
issue146b,
issue176
issue176,
issue243

function issue008()
large = [i^4 + 1e12 for i in 1:10^3]
Expand Down Expand Up @@ -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