Access to the color loop iterator
There is no "user-oriented" (otherwise called "public") method for accessing the base iterator, but you can access it through the "private" (by convention) methods. However, you cannot get the iterator state without changing it.
Color cycle setting
Quick side: you can set the color / cycle of properties in various ways (for example, ax.set_color_cycle in versions <1.5 or ax.set_prop_cycler in> = 1.5). Take a look at the example here for version 1.5 or higher or the previous style here .
Access to the base iterator
However, despite the lack of open access to this process, you can access it for a given object of axes ( ax ) through _get_lines auxiliary class _get_lines . ax._get_lines is a touch vaguely named, but it's a behind-the-scenes mechanism that allows the plot command to handle all the odd and varied ways of plotting. Among other things, this is what tracks which colors are automatically assigned. Similarly, ax._get_patches_for_fill controls the cyclic use of the default fill colors and patch properties.
Anyway, the iterable loop cycle is ax._get_lines.color_cycle for strings and ax._get_patches_for_fill.color_cycle for patches. On Matplotlib> = 1.5, this has changed to use the cycler library , and the iteration is called prop_cycler instead of color_cycle and gives dict properties instead of just color.
In general, you would do something like:
import matplotlib.pyplot as plt fig, ax = plt.subplots() color_cycle = ax._get_lines.color_cycle
You cannot view the status of iterator
However, this object is a bare iterator . We can easily get the next element (for example, next_color = next(color_cycle) , but this means that the next color will be displayed after that. By design, there is no way to get the current state of the iterator without changing it.
In v1.5 or higher, it would be nice to get the cycler object cycler , since we could infer its current state. However, the cycler object cycler not available (publicly or privately) anywhere. Instead, only the itertools.cycle instance created from the cycler object is available. In any case, there is no way to get to the ground state of the color / cycler property.
Match the color of a previously drawn object instead
In your case, it sounds as if you want to match the color of what was simply built. Instead of deciding what the color / property will be, set the / etc color of your new element based on the properties of what is plotted.
For example, in the case you described, I would do something like this:
import matplotlib.pyplot as plt import numpy as np def custom_plot(x, y, **kwargs): ax = kwargs.pop('ax', plt.gca()) base_line, = ax.plot(x, y, **kwargs) ax.fill_between(x, 0.9*y, 1.1*y, facecolor=base_line.get_color(), alpha=0.5) x = np.linspace(0, 1, 10) custom_plot(x, x) custom_plot(x, 2*x) custom_plot(x, -x, color='yellow', lw=3) plt.show()

This is not the only way, but it is cleaner than trying to get the color of the drawn line before that, in this case.