Python 将matplotlib轴的格式设置为10的幂次方(理想情况下为6的幂次方)

Python 将matplotlib轴的格式设置为10的幂次方(理想情况下为6的幂次方),python,matplotlib,Python,Matplotlib,我有一个数据集(下面共享),我打算根据初始记录绘制hf\u gen。我使用以下matplotlib脚本生成绘图。我喜欢将我的“x轴”图形以10到6的幂表示。我试着使用ScalarFormatter。x轴的幂为9 import matplotlib.pyplot as plt from matplotlib.ticker import ScalarFormatter fig = plt.figure()#figsize=(11,8) ax1 = fig.add_

我有一个数据集(下面共享),我打算根据
初始记录绘制
hf\u gen
。我使用以下
matplotlib
脚本生成绘图。我喜欢将我的“x轴”图形以10到6的幂表示。我试着使用ScalarFormatter
。x轴的幂为9

    import matplotlib.pyplot as plt
    from matplotlib.ticker import ScalarFormatter 

    fig = plt.figure()#figsize=(11,8)
    ax1 = fig.add_subplot(111)

    ax1.plot(bulk_ingest_data['initial_records'][0:5], bulk_ingest_data['hf_gen(s)'][0:5], color='r', marker='o', label='LAS data in text form') #500
    ax1.plot(bulk_ingest_data['initial_records'][5:10], bulk_ingest_data['hf_gen(s)'][5:10], color='b', marker='o', label='Binary encoded LAS points') #200
    ax1.xaxis.set_major_formatter(ScalarFormatter(useMathText=True))
    plt.xlabel('Number of records ingested)')
    plt.ylabel('HFile generation time(s)')
handles, labels = ax1.get_legend_handles_labels()
lgd = ax1.legend(handles, labels, loc='upper left')#, bbox_to_anchor=(1.15,1)
ax1.grid('on')
正确的方法是什么,使它成为六的幂,这样我的x轴值是六的幂,有三位数的值作为基值


请不要发布代码或数据的图像。复制并粘贴为文本,然后将其格式化为代码(选择它并键入
ctrl-k
)。。。你的意思是可能是复制品?