fix legend marker for vector of markersizes [skip ci]

This commit is contained in:
Daniel Schwabeneder 2020-04-30 10:04:04 +02:00
parent e44b220b84
commit 2ea998983d

View File

@ -1317,7 +1317,7 @@ function py_add_legend(plt::Plot, sp::Subplot, ax)
markersize = py_thickness_scale(plt, 0.8 * sp[:legendfontsize]),
markeredgecolor = py_color(single_color(get_markerstrokecolor(series)), get_markerstrokealpha(series)),
markerfacecolor = py_color(single_color(get_markercolor(series, clims)), get_markeralpha(series)),
markeredgewidth = py_thickness_scale(plt, 0.8 * series[:markerstrokewidth] * sp[:legendfontsize] / series[:markersize]) # retain the markersize/markerstroke ratio from the markers on the plot
markeredgewidth = py_thickness_scale(plt, 0.8 * get_markerstrokewidth(series) * sp[:legendfontsize] / first(series[:markersize])) # retain the markersize/markerstroke ratio from the markers on the plot
)
else
series[:serieshandle][1]