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

**URL:** <https://discourse.julialang.org/t/adjusting-font-size-in-plot-jl-legend-symbols-and-lines-out-of-scale/117141>\
**Category:** Visualization\
**Tags:** plotting\
**Created:** [July 17, 2024, 1:18pm UTC](https://discourse.julialang.org/t/adjusting-font-size-in-plot-jl-legend-symbols-and-lines-out-of-scale/117141 "2024-07-17T13:18:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TobiasSchaefer](https://avatars.discourse-cdn.com/v4/letter/t/76d3ee/32.png) [@TobiasSchaefer](https://discourse.julialang.org/u/TobiasSchaefer)\
**Post date:** [July 17, 2024, 1:18pm UTC](https://discourse.julialang.org/t/adjusting-font-size-in-plot-jl-legend-symbols-and-lines-out-of-scale/117141/1 "2024-07-17T13:18:10Z")

</div>

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.

```julia
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](https://global.discourse-cdn.com/julialang/original/3X/5/1/51f7862491b15e3ea51cc00245e0a5b41b12613e.png)

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?

---

<div class="post-metadata">

**Author:** ![PeterSimon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petersimon/32/25193_2.png) [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Post date:** [July 17, 2024, 8:17pm UTC](https://discourse.julialang.org/t/adjusting-font-size-in-plot-jl-legend-symbols-and-lines-out-of-scale/117141/3 "2024-07-17T20:17:36Z")

</div>

Hello and welcome to Julia Discourse.

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

```julia
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](https://global.discourse-cdn.com/julialang/original/3X/8/5/85bc66cdcef952115526973f72506e97b6f637e0.png)  
I haven’t tried any of the other backends.

Edit: This is a [known issue](https://github.com/JuliaPlots/Plots.jl/issues/4621) with the default, GR backend.
