在ggplot python上将科学符号转换为实数

2024-09-30 18:22:59 发布

您现在位置:Python中文网/ 问答频道 /正文

我试着用Pythonggplot作图,但是x和y的aax在科学记数法中出现了

这是我的代码:

ggplot(dfMerge, aes(x='rent_price',y='sale_price', color='outlier',label='name')) +\
geom_text(hjust=0, vjust=0, size=20) +\
geom_point() +\
scale_y_continuous(labels="%.2f") +\
xlab("Rent Unit Price") +\
ylab("Sale Unit Price") +\
stat_smooth(color='blue') 

下面是我得到的情节: enter image description here

如何将轴上的指数值改为实数?在

谢谢。在


Tags: 代码unit科学pricecoloraesgeomggplot