handle unmatching vectors
This commit is contained in:
parent
2c4535f6f2
commit
fd17dceecc
@ -348,17 +348,20 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
|||||||
# add to legend?
|
# add to legend?
|
||||||
if sp[:legend] != :none && pgfx_should_add_to_legend(series)
|
if sp[:legend] != :none && pgfx_should_add_to_legend(series)
|
||||||
leg_entry = if opt[:label] isa AVec
|
leg_entry = if opt[:label] isa AVec
|
||||||
opt[:label][i]
|
get(opt[:label], i, "")
|
||||||
elseif opt[:label] isa AbstractString
|
elseif opt[:label] isa AbstractString
|
||||||
if i == 1 && opt[:label] != ""
|
if i == 1
|
||||||
opt[:label]
|
opt[:label]
|
||||||
else
|
else
|
||||||
push!(segment_plot.options, "forget plot" => nothing)
|
""
|
||||||
continue
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
throw(ArgumentError("Malformed label. label = $(opt[:label])"))
|
throw(ArgumentError("Malformed label. label = $(opt[:label])"))
|
||||||
end
|
end
|
||||||
|
if leg_entry == ""
|
||||||
|
push!(segment_plot.options, "forget plot" => nothing)
|
||||||
|
continue
|
||||||
|
end
|
||||||
leg_opt = PGFPlotsX.Options()
|
leg_opt = PGFPlotsX.Options()
|
||||||
if ribbon !== nothing
|
if ribbon !== nothing
|
||||||
pgfx_filllegend!(axis.contents[end - 3].options, opt)
|
pgfx_filllegend!(axis.contents[end - 3].options, opt)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user