# How to set different linestyles in Makie Series plot

**URL:** <https://discourse.julialang.org/t/how-to-set-different-linestyles-in-makie-series-plot/75818>\
**Category:** Visualization\
**Tags:** plotting, makie\
**Created:** [February 4, 2022, 6:55pm UTC](https://discourse.julialang.org/t/how-to-set-different-linestyles-in-makie-series-plot/75818 "2022-02-04T18:55:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bgctw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bgctw/32/22050_2.png) [@bgctw](https://discourse.julialang.org/u/bgctw)\
**Post date:** [February 4, 2022, 6:55pm UTC](https://discourse.julialang.org/t/how-to-set-different-linestyles-in-makie-series-plot/75818/1 "2022-02-04T18:55:46Z")

</div>

The Makie series command can be used to plot several lines of a matrix.

I found an [documentation example](https://makie.juliaplots.org/stable/examples/plotting_functions/series/index.html) that shows how to set different labels and colors for the different lines.  
Could someone hint me to documentation or example on how I specify different linestyles for the different lines? These are important for greyscale prints.

---

<div class="post-metadata">

**Author:** ![icweaver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/icweaver/32/45764_2.png) [@icweaver](https://discourse.julialang.org/u/icweaver)\
**Post date:** [May 18, 2022, 6:04am UTC](https://discourse.julialang.org/t/how-to-set-different-linestyles-in-makie-series-plot/75818/2 "2022-05-18T06:04:11Z")

</div>

Sorry, just stumbled onto this myself. I’m not sure if `Series` supports line styles directly, but plotting `Line`s and cycling their line style with a [theme](https://makie.juliaplots.org/stable/documentation/theming/index.html) seems to do the trick:

```julia
using CairoMakie

with_theme(Lines=(; cycle=:linestyle)) do
	fig = Figure()
	ax = Axis(fig[1, 1])

	for (i, line) ∈ enumerate(eachcol(rand(10, 5)))
		lines!(ax, line; label="L$(i)")
	end

	axislegend()

	fig
end

```

 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/c/fccd82a2251e0fc4a5822f2d9a2c150987846724.png)
