text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

import pandas as pd
pd.set_option('display.max_columns', None)
import numpy as np
import scipy.stats as stats
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style(style='darkgrid')
sns.set_palette(palette='pastel')
pd.options.display.max_colwidth = 300
cmap = sns.diverging_palette(220, 10, as_cmap=True)

data = pd.read_csv('/kaggle/input/red-wine-quality-cortez-et-al-2009/winequality-red.csv')

plt.figure(figsize=(15, 6))
quality_count = data['quality'].value_counts().sort_values(ascending=False).to_frame()
quality_count = quality_count.rename(columns={'quality': 'Count'})
ax = sns.barplot(x=quality_count.index, y='Count', data=quality_count, palette='ch:.25')
for p in ax.patches:
    ax.annotate(format(p.get_height(), '.1f'), (p.get_x() + p.get_width() / 2.0, p.get_height()), ha='center', va='center', xytext=(0, 9), textcoords='offset points')
plt.xlabel('Quality', fontsize=15)
plt.ylabel('Count', fontsize=15)
plt.title('Bar plot of Quality', fontsize=20)
plt.show()