fix plotting empty plot for plotly
This commit is contained in:
parent
91bb983c08
commit
f05237c5fc
@ -1031,6 +1031,9 @@ end
|
|||||||
|
|
||||||
# get a list of dictionaries, each representing the series params
|
# get a list of dictionaries, each representing the series params
|
||||||
function plotly_series(plt::Plot)
|
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)
|
reduce(vcat, plotly_series(plt, series) for series in plt.series_list)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ using Plots, Test
|
|||||||
|
|
||||||
p = plot(rand(10))
|
p = plot(rand(10))
|
||||||
@test isa(p, Plots.Plot) == true
|
@test isa(p, Plots.Plot) == true
|
||||||
|
@test_nowarn Plots.plotly_series(plot())
|
||||||
end
|
end
|
||||||
|
|
||||||
@testset "Contours" begin
|
@testset "Contours" begin
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user