fix saving as .tikz (#2901)
This commit is contained in:
parent
806d4671ce
commit
c73a5aaabc
@ -112,7 +112,7 @@ function savefig(plt::Plot, fn::AbstractString)
|
|||||||
fn = abspath(expanduser(fn))
|
fn = abspath(expanduser(fn))
|
||||||
|
|
||||||
# get the extension
|
# get the extension
|
||||||
fn, ext = splitext(fn)
|
_, ext = splitext(fn)
|
||||||
ext = chop(ext, head = 1, tail = 0)
|
ext = chop(ext, head = 1, tail = 0)
|
||||||
if isempty(ext)
|
if isempty(ext)
|
||||||
ext = defaultOutputFormat(plt)
|
ext = defaultOutputFormat(plt)
|
||||||
|
|||||||
@ -302,6 +302,11 @@ end
|
|||||||
lines = readlines(io)
|
lines = readlines(io)
|
||||||
@test count(s -> occursin("node", s), lines) == 9
|
@test count(s -> occursin("node", s), lines) == 9
|
||||||
end
|
end
|
||||||
|
# test .tikz extension
|
||||||
|
file_path =joinpath(path,"annotations.tikz")
|
||||||
|
@test_nowarn savefig(annotation_plot, file_path)
|
||||||
|
@test_nowarn open(file_path) do io
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end # testset
|
end # testset
|
||||||
@testset "Ribbon" begin
|
@testset "Ribbon" begin
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user