fix plotting empty plot for plotly

This commit is contained in:
Simon Christ 2022-01-25 15:44:43 +01:00
parent 91bb983c08
commit f05237c5fc
2 changed files with 4 additions and 0 deletions

View File

@ -1031,6 +1031,9 @@ end
# get a list of dictionaries, each representing the series params
function plotly_series(plt::Plot)
if isempty(plt.series_list)
return KW[]
end
reduce(vcat, plotly_series(plt, series) for series in plt.series_list)
end

View File

@ -7,6 +7,7 @@ using Plots, Test
p = plot(rand(10))
@test isa(p, Plots.Plot) == true
@test_nowarn Plots.plotly_series(plot())
end
@testset "Contours" begin