def _process_plot_format(fmt):
linestyle = None<EOL>marker = None<EOL>color = None<EOL>try:<EOL><INDENT>color = mcolors.colorConverter.to_rgb(fmt)<EOL>return linestyle, marker, color     <EOL><DEDENT>except ValueError:<EOL><INDENT>pass                                <EOL><DEDENT>if fmt.find('<STR_LIT>')>=<NUM_LIT:0>:<EOL><INDENT>linestyle = '<STR_LIT>'<EOL>fmt = fmt.replace('<STR_LIT>', '<STR_LIT>')<EOL><DEDENT>if fmt.find('<STR_LIT>')>=<NUM_LIT:0>:<EOL><INDENT>linestyle = '<STR_LIT>'<EOL>fmt = fmt.replace('<STR_LIT>', '<STR_LIT>')<EOL><DEDENT>if fmt.find('<STR_LIT:U+0020>')>=<NUM_LIT:0>:<EOL><INDENT>linestyle = '<STR_LIT:None>'<EOL>fmt = fmt.replace('<STR_LIT:U+0020>', '<STR_LIT>')<EOL><DEDENT>chars = [c for c in fmt]<EOL>for c in chars:<EOL><INDENT>if c in mlines.lineStyles:<EOL><INDENT>if linestyle is not None:<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>' % fmt)<EOL><DEDENT>linestyle = c<EOL><DEDENT>elif c in mlines.lineMarkers:<EOL><INDENT>if marker is not None:<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>' % fmt)<EOL><DEDENT>marker = c<EOL><DEDENT>elif c in mcolors.colorConverter.colors:<EOL><INDENT>if color is not None:<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>' % fmt)<EOL><DEDENT>color = c<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>' % c)<EOL><DEDENT><DEDENT>if linestyle is None and marker is None:<EOL><INDENT>linestyle = rcParams['<STR_LIT>']<EOL><DEDENT>if linestyle is None:<EOL><INDENT>linestyle = '<STR_LIT:None>'<EOL><DEDENT>if marker is None:<EOL><INDENT>marker = '<STR_LIT:None>'<EOL><DEDENT>return linestyle, marker, color<EOL>
Process a matlab(TM) style color/line style format string.  Return a
(*linestyle*, *color*) tuple as a result of the processing.  Default
values are ('-', 'b').  Example format strings include:

* 'ko': black circles
* '.b': blue dots
* 'r--': red dashed lines

.. seealso::
    :func:`~matplotlib.Line2D.lineStyles` and
    :func:`~matplotlib.pyplot.colors`:
        for all possible styles and color format string.