【问题标题】:After apply seaborn yticklabels color, it is not aligned应用 seaborn yticklabels 颜色后,未对齐
【发布时间】:2020-11-25 01:34:18
【问题描述】:

在将 yticklabels 颜色应用到白色之前,下图是对齐的 不知道为什么改了enter image description here

%matplotlib inline

import matplotlib.pyplot as plt
import seaborn

sns.set(rc={'axes.facecolor' : 'darkslategrey', 'figure.facecolor' : 'darkslategray', 'grid.color' : 'k', 'axes.edgecolor' : 'black',
           })

g = sns.catplot(data=desert_data,x='total_time',y='name', kind='bar', color='yellow', saturation=.7, height=3.5, aspect=2)

g.set_xticklabels(color='white')
g.set_yticklabels(color='white')
g.set_xlabels('')
g.set_ylabels('')

g.tight_layout()

enter image description here

【问题讨论】:

    标签: colors alignment seaborn


    【解决方案1】:

    我发现旧的 matplotlib 存在这些图形截断问题

    通过安装最新的matplotlib版本解决 (3.1.1 -> 3.3.3)

    【讨论】:

      猜你喜欢
      • 2018-04-24
      • 1970-01-01
      • 2017-09-12
      • 1970-01-01
      • 2021-05-08
      • 2017-01-22
      • 1970-01-01
      • 2022-01-23
      • 1970-01-01
      相关资源
      最近更新 更多