答案 0 :(得分:1)
我通常使用subplots
中的matplotlib
函数来控制图形尺寸。对于seaborn,您通常可以沿matplotlib轴传递。
import matplotlib.pyplot as plt
import seaborn as sns
height = 20
width = 10
fig, ax = plt.subplots(figsize=(height,width)) # I might have swapped height and width here, I never remeber which order they're in
# Do what you had before with barplot just pass in your axis as the ax key word:
sns.barplot(..., ax=ax)