Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

Handling the axis range and intervals for a bar plot

$
0
0

@syed.danish wrote:

I am trying to plot a bar plot using the following code :
train.groupby(['hour']).Count.sum().plot(kind='bar')
and this plots the following graph :

but when i try to change the x-axis to be shown after an interval of 4 from the following code :
train.groupby(['hour']).Count.sum().plot(kind='bar')
plt.xticks(np.arange(0,24,4))

it shows :

how to correctly manage the x-axis?
Thanks
Danish

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles