我正在尝试将x轴间隔设置为1。如果我的x限制从0到5,python会自动将间隔设置为1。如果我将max x限制更改为小于5的任何值,Python会自动更改我的x间距为0.5。如何将我的间距设置为1?
编辑:
#thermal profile
if Wells["Temperature"].loc[ID] == 1:
TempSat = ThermalProfile[ThermalProfile["Well ID"] == ID]
Temp_Events = pd.DataFrame(TempSat["Event"].unique())
i = 0
for index, method in Temp_Events.iterrows():
tempDF = TempSat[TempSat["Event"] == method[0]]
satfig.plot(tempDF["Corrected Temp"], tempDF["Elevation"], marker = "<", linewidth = 2, markersize = 10, color = colors[i], label = method[0])
i = i + 1
satfig.set_xlim(0, 4)
#satfig.set_xticks(range(0, int(math.ceil(NAPL_Saturation["Saturation"].max() / 500) * 500) + 500, 500))
satfig.set_ylim(ymin_ftmsl, ymax_ftmsl)
satfig.set_xlabel("Corrected Temperature ($^\circ$C)")
satfig.grid()
satfig.set_ylabel("Elevation (ft msl)")