# How to change the line width of mean curve when plotting with Plots.jl and MonteCarloMeasurements.jl

**URL:** <https://discourse.julialang.org/t/how-to-change-the-line-width-of-mean-curve-when-plotting-with-plots-jl-and-montecarlomeasurements-jl/86046>\
**Category:** Visualization\
**Tags:** plots, monte-carlo\
**Created:** [August 20, 2022, 12:48am UTC](https://discourse.julialang.org/t/how-to-change-the-line-width-of-mean-curve-when-plotting-with-plots-jl-and-montecarlomeasurements-jl/86046 "2022-08-20T00:48:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Firstname\_Lastname](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/firstname_lastname/32/34201_2.png) [@Firstname\_Lastname](https://discourse.julialang.org/u/Firstname_Lastname)\
**Post date:** [August 20, 2022, 12:48am UTC](https://discourse.julialang.org/t/how-to-change-the-line-width-of-mean-curve-when-plotting-with-plots-jl-and-montecarlomeasurements-jl/86046/1 "2022-08-20T00:48:51Z")

</div>

Using `plot` command in MonteCarloMeasurements.jl package, I have a plot of mean function and a shaded area showing the (0.025,0.0975) quantiles.

How can I change the width (or line style) of the mean curve? I tried already with the option, for example, `ls=:dash` in `plot` command, but then all other curves also change to be dashed.

Thank you.

---

<div class="post-metadata">

**Author:** ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Post date:** [August 22, 2022, 2:16pm UTC](https://discourse.julialang.org/t/how-to-change-the-line-width-of-mean-curve-when-plotting-with-plots-jl-and-montecarlomeasurements-jl/86046/2 "2022-08-22T14:16:09Z")

</div>

The plot will consist of two series, the first one is the mean and the second one is all the samples. You can thus set the linewidth of the mean to `5` using

```julia
plot(a, lw=[5 1])

```

Similarily

```julia
plot(a, linestyle=[:dash :solid])

```

makes the mean dashed but the samples solid.

---

<div class="post-metadata">

**Author:** ![Firstname\_Lastname](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/firstname_lastname/32/34201_2.png) [@Firstname\_Lastname](https://discourse.julialang.org/u/Firstname_Lastname)\
**Post date:** [August 25, 2022, 11:37pm UTC](https://discourse.julialang.org/t/how-to-change-the-line-width-of-mean-curve-when-plotting-with-plots-jl-and-montecarlomeasurements-jl/86046/3 "2022-08-25T23:37:11Z")

</div>

It works, thank you @baggepinnen.
