How to rotate x-axis tick labels in Pandas barplot

后端 未结 6 1691
孤城傲影
孤城傲影 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:22

    You can use set_xticklabels()

    ax.set_xticklabels(df['Names'], rotation=90, ha='right')
    

提交回复
热议问题