# How to configure a colormap using PyPlot

**URL:** https://discourse.julialang.org/t/how-to-configure-a-colormap-using-pyplot/43746
**Category:** New to Julia
**Tags:** question, plotting, pyplot
**Created:** [July 27, 2020, 7:42am UTC](https://discourse.julialang.org/t/how-to-configure-a-colormap-using-pyplot/43746 "2020-07-27T07:42:18Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![fgerick](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fgerick/32/13228_2.png) [@fgerick](https://discourse.julialang.org/u/fgerick)
#### Post date: [July 27, 2020, 11:36am UTC](https://discourse.julialang.org/t/how-to-configure-a-colormap-using-pyplot/43746/4 "2020-07-27T11:36:21Z")

</div>

I see. I found a way to do this from [this page of the manual](https://matplotlib.org/3.2.1/tutorials/intermediate/color_cycle.html) I followed this solution:

```julia

using PyPlot

using PyCall

cm=get_cmap(:tab20);

cycler = pyimport("cycler")
PyPlot.rc("axes",prop_cycle=cycler.cycler(color=[cm(t/19) for t in 0:19]))

fig, ax = subplots()

x = 1:0.1:10
y = exp.(x/π)

for i=1:20
    ax.plot(x/π,i*y, "-o")
end

```

which gives the plot you have shown above! Probably there’s a nicer way to extract the `tab20` cycler!?

---

_[View the full topic](https://discourse.julialang.org/t/how-to-configure-a-colormap-using-pyplot/43746)._
