We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a36db6 commit 52a83c8Copy full SHA for 52a83c8
test/runtests.jl
@@ -21,9 +21,10 @@ end
21
# with Matplotlib 1.3, I get "UserWarning: bbox_inches option for ps backend is not implemented yet"
22
if PyPlot.version >= v"2"
23
s = sprint(show, "application/postscript", fig);
24
- m = match(r"%%BoundingBox: *([0-9]+) +([0-9]+) +([0-9]+) +([0-9]+)", s)
+ # m = match(r"%%BoundingBox: *([0-9]+) +([0-9]+) +([0-9]+) +([0-9]+)", s)
25
+ m = match(r"%%BoundingBox: *([0-9]+\.?[0-9]*) +([0-9]+\.?[0-9]*) +([0-9]+\.?[0-9]*) +([0-9]+\.?[0-9]*)", s)
26
@test m !== nothing
- boundingbox = map(s -> parse(Int, s), m.captures)
27
+ boundingbox = map(s -> parse(Float64, s), m.captures)
28
@info("got plot bounding box ", boundingbox)
29
@test all([300, 200] .< boundingbox[3:4] - boundingbox[1:2] .< [450,350])
30
end
0 commit comments