Is it possible to query the current state of the matplotlib color cycle? In other words is there a function get_cycle_state that will behave in the following wa
Note: In the latest versions of matplotlib (>= 1.5) _get_lines has changed. You now need to use next(ax._get_lines.prop_cycler)['color'] in Python 2 or 3 (or ax._get_lines.prop_cycler.next()['color'] in Python 2) to get the next color from the color cycle.
Wherever possible use the more direct approach shown in the lower part of @joe-kington's answer. As _get_lines is not API-facing it might change again in a not backward compatible manner in the future.