相关疑难解决方法(0)

如何格式化seaborn / matplotlib轴刻度标签从数字到成千上万?(125436至125.4K)

import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import seaborn as sns
import pandas as pd
sns.set(style="darkgrid")    
fig, ax = plt.subplots(figsize=(8, 5))    
palette = sns.color_palette("bright", 6)
g = sns.scatterplot(ax=ax, x="Area", y="Rent/Sqft", hue="Region", marker='o', data=df, s=100, palette= palette)
g.legend(bbox_to_anchor=(1, 1), ncol=1)
g.set(xlim = (50000,250000))
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

如何将轴格式从数字更改为自定义格式?例如125000至125.00K

python matplotlib seaborn

9
推荐指数
4
解决办法
1万
查看次数

标签 统计

matplotlib ×1

python ×1

seaborn ×1