更新时间:2023-11-22 08:38:46
您可以创建轴,然后使用 ax.xlim()
.
You can create axes and then use ax.xlim()
.
import pandas as pd
df = pd.DataFrame({'x':[1,2,3], 'y':[3,4,5]})
fig = plt.figure()
ax = plt.subplot(111)
df.plot(x='x',y='y',ax=ax, kind='scatter')
ax.set_xlim(2,3)