def normalize_lms_axis(ax, xlim=110, ylim=110, xfactor=1e-6, yfactor=1,
                       xlabel=None, ylabel="Map (cM)"):
    if xlim:
        ax.set_xlim(0, xlim)
    if ylim:
        ax.set_ylim(0, ylim)
    if xlabel:
        xticklabels = [int(round(x * xfactor)) for x in ax.get_xticks()]
        ax.set_xticklabels(xticklabels, family='Helvetica')
        ax.set_xlabel(xlabel)
    else:
        ax.set_xticks([])
    if ylabel:
        yticklabels = [int(round(x * yfactor)) for x in ax.get_yticks()]
        ax.set_yticklabels(yticklabels, family='Helvetica')
        ax.set_ylabel(ylabel)
    else:
        ax.set_yticks([])
dataset/ETHPy150Open tanghaibao/jcvi/projects/allmaps.py/normalize_lms_axis/original