To see the wrong Bar plot click here
I want to plot a bar graph with x_axis is price and y_axis is inter-price time.But the price is a large amount of data, so in this plot, theres too much bars and labels, so they
re overlapping with each other and cannot read.I hope to decrease the labels but keep the bars.
How can I solve this problem?
the data is like:
0.05$ 1000
0.06$ 1200
0.04$ 1040
and the code is
# plot bar graph
plt.subplot(222)
ax2 = plt.gca() # get axis
plt.xlabel('Price / $')# set label
plt.ylabel('Interval / Second')
ax2.yaxis.get_major_formatter().set_powerlimits((0,1)) # set number
and use Seaborn to plot
sns.barplot(df_sort['Price'],df_sort['Interval'],errwidth=1.0,palette="Blues_d",edgecolor='white')#plot