import matplotlib.pyplot as plt import seaborn as sns features = ['sepal_length', 'sepal_width', 'petal_length', 'petal_width'] # Definicja niestandardowej palety kolorów custom_palette = ['#FFC0CB', '#800080', '#0000FF', '#FFFF00'] # Różowy, Fioletowy, Niebieski, Żółty plt.figure(figsize=(15, 10)) for i, feature in enumerate(features): plt.subplot(2, 2, i + 1) # Tworzy siatkę 2x2 dla wykresów sns.histplot(data=iris, x=feature, kde=True, hue='species', palette=custom_palette) # Użycie niestandardowej palety plt.title(f'Rozkład {feature} według gatunków') plt.xlabel(feature) plt.ylabel('Częstość') plt.tight_layout() plt.show()