I have a dataframe with customers and their scores
Customer Score
A 20000
B 25000
C 25000
D 25000
E 2000
F 2000
G 12000
I would like to plot a scatter plot which shows the frequency in a scientific notation. Currently I have plotted the data above as follows
fig, ax = plt.subplots()
df['Score'].value_counts().plot(ax=ax, kind='bar')
How can I transform axis in a scientific notation? For example, 10^1?
In order to format your yaxis to scientific notation:
ax.yaxis.get_major_formatter().set_scientific(True)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.