def set_dict_arg(key, arg, line_dim_obj, artists, legend_handles=None):
    """Helper for artist-sepcific matplotlib kwargs"""
    set_attr_name = 'set_' + key
    for dim_index, value in arg.items():
        index = line_dim_obj._array_index(dim_index)
        if isinstance(index, int):
            key_artists = [artists[index]]
        else:
            key_artists = artists[index]
        if not key_artists:
            continue
        for artist in key_artists:
            getattr(artist, set_attr_name)(value)
        if legend_handles is not None:
            for artist in key_artists:
                artist.set_label(dim_index)
            legend_handles[dim_index] = artist
