import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # Create data data = pd.DataFrame({ 'Animal': ['Rhino', 'Giraffe', 'Lion'], 'Weight': [3000, 1200, 250] }) # Sort by Weight descending data = data.sort_values('Weight', ascending=False) # Set seaborn style without gridlines sns.set_theme(style="white") # 'white' style removes most gridlines # Column chart plt.figure(figsize=(8,6)) bars = sns.barplot(x='Animal', y='Weight', data=data, color="#D44803") # Add data labels for bar in bars.patches: height = bar.get_height() bars.annotate(f'{int(height)}', xy=(bar.get_x() + bar.get_width()/2, height), xytext=(0, 5), textcoords="offset points", ha='center', va='bottom', fontsize=12) plt.title('Column Chart: Animal Weights with PikBioStat') plt.xlabel('Animal') plt.ylabel('Weight (kg)') sns.despine(left=True, bottom=True) # removes top/left/bottom spines plt.show() # Bar chart plt.figure(figsize=(8,6)) bars = sns.barplot(x='Weight', y='Animal', data=data, color="#D44803") # Add data labels for bar in bars.patches: width = bar.get_width() bars.annotate(f'{int(width)}', xy=(width, bar.get_y() + bar.get_height()/2), xytext=(5, 0), textcoords="offset points", ha='left', va='center', fontsize=12) plt.title('Bar Chart: Animal Weights with PikBioStat') plt.xlabel('Weight (kg)') plt.ylabel('Animal') sns.despine(left=True, bottom=True) plt.show()