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))
|
||||
|
||||
# get the extension
|
||||
fn, ext = splitext(fn)
|
||||
_, ext = splitext(fn)
|
||||
ext = chop(ext, head = 1, tail = 0)
|
||||
if isempty(ext)
|
||||
ext = defaultOutputFormat(plt)
|
||||
|
||||
@ -302,6 +302,11 @@ end
|
||||
lines = readlines(io)
|
||||
@test count(s -> occursin("node", s), lines) == 9
|
||||
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 # testset
|
||||
@testset "Ribbon" begin
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user