我有一个可能很简单的问题。我使用seaborn从Excel文件中的数据创建了一张柱状图。为了更好的可视化,我想在条形或箱子之间留些空间。这是可能的吗?
我的代码如下:
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
%matplotlib inline
from IPython.display import set_matplotlib_formats
set_matplotlib_formats('svg', 'pdf')
df = pd.read_excel('test.xlsx')
sns.set_style("white")
#sns.set_style("dark")
plt.figure(figsize=(12,10))
plt.xlabel('a', fontsize=18)
plt.ylabel('test2', fontsize=18)
plt.title ('tests ^2', fontsize=22)
ax = sns.distplot(st,bins=34, kde=False, hist_kws={'range':(0,1), 'edgecolor':'black', 'alpha':1.0}, axlabel='test1')
虽然有点离题,但我的第二个问题是,如何让图表标题中的指数实际上被抬起来?
谢谢!