# How to adjust legend width to display the entire linestyle?

**URL:** <https://discourse.julialang.org/t/how-to-adjust-legend-width-to-display-the-entire-linestyle/25618>\
**Category:** General Usage\
**Tags:** question, plotting, bug\
**Created:** [June 24, 2019, 6:09pm UTC](https://discourse.julialang.org/t/how-to-adjust-legend-width-to-display-the-entire-linestyle/25618 "2019-06-24T18:09:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![biona001](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/biona001/32/16497_2.png) [@biona001](https://discourse.julialang.org/u/biona001)\
**Post date:** [June 24, 2019, 6:09pm UTC](https://discourse.julialang.org/t/how-to-adjust-legend-width-to-display-the-entire-linestyle/25618/1 "2019-06-24T18:09:10Z")

</div>

In the legend below, the linestyle for `Neg Bin (nd)` and `Matrix size` is indistinguishable without color. Is there a way to increase the width of the displayed legend? Or is there another line style to choose from?

Edit: for some reason the figure below can only be made in jupyter notebook. In the REPL, it would a figure where all legend linestyle (except for 1) are solid lines. This is probably a bug, so adding bug report tag…

 ![15%20AM](https://global.discourse-cdn.com/julialang/original/3X/6/1/61ac0bc197a689bc778a6aec0c70e1f1c1ebe877.png)

```julia
using Plots
x = collect(10:10:120)
y = 10rand(12, 5)
test = plot(x, y, xlabel = "Samples (thousands)",
    ylabel = "Memory (GB)", w=3, lab = ["Normal (nd)" "Logistic (nd)" "Poisson (nd)" "Neg Bin (nd)" "Matrix size"], 
    legend=:topleft, xticks = 0:30:120, xlim = (0, 130), 
    linestyle = [:solid :dash :dot :dashdot :dashdotdot],
    xtickfont=font(14), 
    ytickfont=font(14), 
    guidefont=font(14), 
    legendfont=font(14), size=(450, 400))

```
