Adjusting Font Size in Plot.jl: Legend Symbols and Lines Out of Scale

Dear Julia community,

Using default settings, the font size in a figure created with Plot.jl is very small.
However, if I try to adapt the font sizes, the symbols and lines in the legend get out of scale.

using Plots
x = 0:6
y1 = sin.(x)
y2 = cos.(x)
plot(x, y1, marker=:circle, linewidth=4, markersize=10)
plot!(x, y2, marker=:diamond, linewidth=4, markersize=10)
plot!(legendfontsize = 12, labelfontsize = 12, tickfontsize = 12)
savefig("test.png")

plot2

Apparently, setting the font size breaks the legend and the circle and diamond are not visible anymore.
How can I restore it such that the legend shows both (line and marker) correctly?

Hello and welcome to Julia Discourse.

It seems that the PyPlot backend doesn’t have this problem:

using Plots
pyplot()
x = 0:6
y1 = sin.(x)
y2 = cos.(x)
plot(x, y1, marker=:circle, linewidth=4, markersize=10)
plot!(x, y2, marker=:diamond, linewidth=4, markersize=10)
plot!(legend=:bottomleft, legendfontsize = 12, labelfontsize = 12, tickfontsize = 12)
savefig("test.png")

test
I haven’t tried any of the other backends.

Edit: This is a known issue with the default, GR backend.