It is possible to cycle line colors with basic plots in `matplotlib.pyplot`:

```
import numpy as np
import matplotlib.pyplot as plt

fig = plt.figure()
ax = fig.add_subplot(111)
ax.set_prop_cycle(plt.cycler('color', ['c', 'm', 'y', 'k']))

x = np.linspace(-1.0, 1.0, 50)
for f in [1.0, 2.0, 3.0, 4.0]:
    ax.plot(x, np.sin(x * f))
plt.show()

```

This results in each partial sinewave plot having the next color from the cycler list, and it will wrap as necessary:

[![Figure 1](https://i.stack.imgur.com/qgMQ7.png)](https://i.stack.imgur.com/qgMQ7.png)

I am using the `contour` plot to draw a single contour. For each case I want to draw a single contour but I want the color shown to automatically cycle through a specified palette (so I can show a readable color-coded legend). However `ax.set_prop_cycle` doesn't seem to have the same effect here:

```
fig = plt.figure()
ax = fig.add_subplot(111)
ax.set_prop_cycle(plt.cycler('color', ['c', 'm', 'y', 'k']))

x = np.linspace(-1.0, 1.0, 50)
y = np.linspace(-1.0, 1.0, 50)
z = np.zeros((len(x), len(y)))

# simple function to create useful contours:
def get_z(x, y, f):
    for i, u in enumerate(x):
        for j, v in enumerate(y):
            z[i, j] = (f * u) ** 2 + (f * v) ** 2
    return z

# plot for multiple values of `f`
for f in [1.0, 2.0, 3.0, 4.0]:
    ax.contour(x, y, get_z(x, y, f), levels=[1], linewidth=2)
plt.show()

```

[![Figure 2](https://i.stack.imgur.com/Rcjr1.png)](https://i.stack.imgur.com/Rcjr1.png)

Each plot (ring) has the same color - it hasn't automatically cycled. I would like to have each plot a different color. I know that each "full" contour plot does cycle through colors for each contour drawn as part of a single plot, but in my case I'm just drawing a single contour at a fixed "level".

Is there a reasonably straightforward way to do this without explicitly specifying a color for each plot? I eventually plan to plot a dynamic number of plots, so it is not really practical to specify them all, and I need it to wrap around when required.

Perhaps there is a way to set or rotate the starting offset of a contour plot's color map?