def phase_linestyle(phasename):
    """
    Method for generating linestyles for delineating sequential phase names
    (e.g. olivine_0, olivine_1) based on their names.

    Parameters
    -----------
    phasename : :class:`str`
        Phase name for which to generate a line style.

    Returns
    ---------
    linestyle : :class:`str`
        Line style for the phase name.
    """
    if '_' in phasename:
        return ['-', '--', ':', '-.'][int(phasename[-1])]
    else:
        return '-'
