Skip to content

Commit 6c35caa

Browse files
committed
some plotting ax returns
1 parent 590ed77 commit 6c35caa

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "DynamicalBilliards"
22
uuid = "4986ee89-4ee5-5cef-b6b8-e49ba721d7a5"
33
repo = "https://github.com/JuliaDynamics/DynamicalBilliards.jl.git"
4-
version = "3.11.2"
4+
version = "3.11.3"
55

66
[deps]
77
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"

src/plotting/billiards.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Works for both periodic and normal billiards.
3636
function plot(bd::Billiard) end
3737

3838
function plot(bd::Billiard{T};
39-
ax = (PyPlot.figure(); PyPlot.gca())) where {T}
39+
ax = (PyPlot.figure(); PyPlot.gca())) where {T <: AbstractFloat}
4040
PyPlot.sca(ax)
4141
for obst in bd; plot(obst); end
4242
xmin, ymin, xmax, ymax = cellsize(bd)
@@ -48,7 +48,7 @@ function plot(bd::Billiard{T};
4848
if !isinf(ymin) && !isinf(ymax)
4949
PyPlot.ylim(ymin - 0.1dy, ymax + 0.1dy)
5050
end
51-
return nothing
51+
return ax
5252
end
5353

5454
function plot(bd::Billiard, xmin, ymin, xmax, ymax;
@@ -72,7 +72,7 @@ function plot(bd::Billiard, xmin, ymin, xmax, ymax;
7272

7373
PyPlot.xlim(xmin, xmax)
7474
PyPlot.ylim(ymin, ymax)
75-
return nothing
75+
return ax
7676
end
7777

7878
function plot(bd, xt::AbstractVector, yt::AbstractVector;
@@ -114,7 +114,7 @@ function plot(bd, xt::AbstractVector, yt::AbstractVector;
114114
PyPlot.gca().set_aspect("equal")
115115
end
116116
end
117-
return nothing
117+
return ax
118118
end
119119

120120
function plot_periodic_rectangle(bd, xmin, ymin, xmax, ymax)

0 commit comments

Comments
 (0)