How to rotate x-axis tick labels in Pandas barplot

后端 未结 6 1693
孤城傲影
孤城傲影 2020-12-07 12:51

With the following code:

import matplotlib
matplotlib.style.use(\'ggplot\')
import matplotlib.pyplot as plt
import pandas as pd

df = pd.DataFrame({ \'cellty         


        
6条回答
  •  感情败类
    2020-12-07 13:25

    For bar graphs, you can include the angle which you finally want the ticks to have.

    Here I am using rot=0 to make them parallel to the x axis.

    series.plot.bar(rot=0)
    plt.show()
    plt.close()
    

提交回复
热议问题