# How to reset theming cycler in Makie axis?

**URL:** <https://discourse.julialang.org/t/how-to-reset-theming-cycler-in-makie-axis/71607>\
**Category:** Visualization\
**Tags:** makie\
**Created:** [November 16, 2021, 7:19pm UTC](https://discourse.julialang.org/t/how-to-reset-theming-cycler-in-makie-axis/71607 "2021-11-16T19:19:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aramirezreyes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aramirezreyes/32/42573_2.png) [@aramirezreyes](https://discourse.julialang.org/u/aramirezreyes)\
**Post date:** [November 16, 2021, 7:19pm UTC](https://discourse.julialang.org/t/how-to-reset-theming-cycler-in-makie-axis/71607/1 "2021-11-16T19:19:07Z")

</div>

Hi there!

I am plotting two sets of lines in the same axis. I would like each line on a set to have the same style (line color, style, width, etc…) to the corresponding line in the other set. Currently, the style cycles continuously, so each line is unique.  
How can I do something like:

```julia
plot one set
reset cycle
plot other set

```

?  
Currently I have:

```julia
x = 1:10

m1 = 5.0
m2 = -5.0
fig = Figure()
firstaxis = Axis(fig[1,1])

#First set
for i in 1:8
   lines!(firstaxis,x, (m1 + 3*rand()) .* x) 
end

#Second set
for i in 1:8
   lines!(firstaxis,x, (m2 + 3*rand()) .* x) 
end

fig

```

Which gives the result:

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

---

<div class="post-metadata">

**Author:** ![aramirezreyes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aramirezreyes/32/42573_2.png) [@aramirezreyes](https://discourse.julialang.org/u/aramirezreyes)\
**Post date:** [November 16, 2021, 7:22pm UTC](https://discourse.julialang.org/t/how-to-reset-theming-cycler-in-makie-axis/71607/2 "2021-11-16T19:22:40Z")

</div>

Answered by @jules in the slack:

> I think it should be possible to do  
> `ax.cycler.counters[Lines] = 0`  
> or something like that, at least that dict holds the state.

With this, the code becomes:

```julia
x = 1:10

m1 = 5.0
m2 = -5.0
fig = Figure()
firstaxis = Axis(fig[1,1])

#First set
for i in 1:8
   lines!(firstaxis,x, (m1 + 3*rand()) .* x) 
end
#Reset cycler
firstaxis.cycler.counters[Lines] = 0
#Second set
for i in 1:8
   lines!(firstaxis,x, (m2 + 3*rand()) .* x) 
end

fig

```

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

Success!
