matplotlib / seaborn图的x轴上有两个零

问题描述 投票:-1回答:1

x轴上有两个零。如何删除一个?

import seaborn as sns 
import matplotlib.pyplot as plt 
%matplotlib inline 
titanic = sns.load_dataset('titanic')
sns.distplot(titanic['fare'],kde=False)

python-3.x matplotlib seaborn
1个回答
1
投票

看起来您可以通过labels关键字指定抽搐。因此,如果您不想要零,那么请指定您想要的数字列表。

https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.set_xticklabels.html

© www.soinside.com 2019 - 2024. All rights reserved.