Python Matplotlib:未显示小刻度

Python Matplotlib:未显示小刻度,python,matplotlib,Python,Matplotlib,由于某种原因,我的绘图中的小刻度不再显示。昨天,我还留着它们,我只是不知道我改变了什么,以至于它们消失了 这是我的密码: import matplotlib.pyplot as plt import matplotlib.font_manager as font_manager fig, axs = plt.subplots(nrows=1, ncols=1, sharex=True, sharey=True) font = font_manager.FontProperties(famil

由于某种原因,我的绘图中的小刻度不再显示。昨天,我还留着它们,我只是不知道我改变了什么,以至于它们消失了

这是我的密码:

import matplotlib.pyplot as plt
import matplotlib.font_manager as font_manager

fig, axs = plt.subplots(nrows=1, ncols=1, sharex=True, sharey=True)

font = font_manager.FontProperties(family='sans-serif', style='normal', size=16)

for (i, alpha) in enumerate(alpha_values_small):
    filt = data[
        (data["Topology"] == "UNIFORM") & 
        (data["HashingPowerDistribution"] == "UNIFORM") & 
        (data["CentralityMeasure"] == "RANDOM") &
        (data["Alpha"] == alpha)]
    axs.plot(
        1/filt["Gamma"],
        filt["OrphanBlockRate"],
        label=r"$\alpha = {}$".format(np.round(alpha, 2)),
        color=color_list[i],
        marker=marker_list[i],
        linestyle="",
        markersize=12,
        linewidth=1.5,
        markeredgewidth=2,
    )
axs.set_xscale("log")
axs.set_xlabel(r"$\lambda_{nd}$", fontfamily='sans-serif', fontsize=22)
axs.set_ylabel("Orphan block rate", fontfamily='sans-serif', fontsize=22)
axs.tick_params(which='major', direction="in", top=True, left=True, right=True, width=1.5, size=6, labelsize=16)
axs.tick_params(which='minor', direction="in", top=True, left=True, right=True, width=1, size=4, labelsize=16)
axs.legend(prop=font, frameon=False)
plt.show()
这将产生以下输出:

有人知道为什么它没有显示我的小滴答声吗


提前非常感谢你

我认为只有在有足够空间的情况下才能看到微小的滴答声

您可以尝试增大体形尺寸

fig, axs = plt.subplots(..., figsize=(10,10))

或者减小字体大小。

您是否使用版本控制,如Git,以便检查您所做的更改?不幸的是,我没有跟踪我创建绘图的jupyter笔记本…就是这样,谢谢!!!