Merge pull request #1133 from JackDevine/legend-markers

PyPlot legends now show marker types.
This commit is contained in:
Michael Krabbe Borregaard 2017-10-05 12:58:02 +02:00 committed by GitHub
commit 4bf0d69f79

View File

@ -1183,6 +1183,14 @@ function py_add_legend(plt::Plot, sp::Subplot, ax)
color = py_color(_cycle(series[:fillcolor],1)),
linewidth = py_dpi_scale(plt, 4)
)
elseif series[:seriestype] == :path
PyPlot.plt[:Line2D]((0,1),(0,0),
color = py_color(_cycle(series[:fillcolor],1)),
linewidth = py_dpi_scale(plt, 1),
marker = py_marker(series[:markershape]),
markeredgecolor = py_markerstrokecolor(series),
markerfacecolor = py_markercolor(series)
)
else
series[:serieshandle][1]
end)