# Plots.jl legend: spacing between symbol and text

**URL:** https://discourse.julialang.org/t/plots-jl-legend-spacing-between-symbol-and-text/38079
**Category:** Visualization
**Created:** [April 23, 2020, 11:22am UTC](https://discourse.julialang.org/t/plots-jl-legend-spacing-between-symbol-and-text/38079 "2020-04-23T11:22:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jamblejoe](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jamblejoe](https://discourse.julialang.org/u/jamblejoe)
#### Post date: [April 23, 2020, 11:22am UTC](https://discourse.julialang.org/t/plots-jl-legend-spacing-between-symbol-and-text/38079/1 "2020-04-23T11:22:49Z")

</div>

Hi,  
is it possible to adjust the spacing between the symol and the text in the legend with Plot.jl? MWE:

```julia
plot([1,2,3],
    linewidth=5,
    legend=true,
    legendfontsize=30,
)

```

produces  
 ![grafik](https://global.discourse-cdn.com/julialang/original/3X/c/c/cc2bb7412f6c4a7270474e1f7f395c1acda9d754.png)  
Can the spacing between the blue line and `y1` the legend be deceased/increased?

---

<div class="post-metadata">

### Author: ![josephmarturano](https://avatars.discourse-cdn.com/v4/letter/j/3d9bf3/32.png) [@josephmarturano](https://discourse.julialang.org/u/josephmarturano)
#### Post date: [April 23, 2020, 12:43pm UTC](https://discourse.julialang.org/t/plots-jl-legend-spacing-between-symbol-and-text/38079/2 "2020-04-23T12:43:46Z")

</div>

To increase the spacing, you can pad the legend label with spaces, like the following:

```julia
using Plots
gr()
myplot1 = plot([1,2,3],
    linewidth=5,
    legend=true,
    legendfontsize=30,
    label="y1"
)

myplot2 = plot([1,2,3],
    linewidth=5,
    legend=true,
    legendfontsize=30,
    label=" y1"
)

combinedplot = plot(myplot1, myplot2, layout=(1,2))

savefig(combinedplot, "myplot.png")

```

The extra padding does not show up in the plot preview window, but does appear in the saved PNG plot.

I do not know how to decrease the spacing but would interested in a solution.

---

<div class="post-metadata">

### Author: ![jamblejoe](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jamblejoe](https://discourse.julialang.org/u/jamblejoe)
#### Post date: [April 23, 2020, 2:01pm UTC](https://discourse.julialang.org/t/plots-jl-legend-spacing-between-symbol-and-text/38079/3 "2020-04-23T14:01:23Z")

</div>

That is good to know! I am mostly interested in decreasing the spacing as well.
