iQRcDEQBTHLdcA6Ncp4A Miuul Data Visualization Cheat Sheet
iQRcDEQBTHLdcA6Ncp4A Miuul Data Visualization Cheat Sheet
Cheat Sheet
Importing Libraries
Example
# Sample dataset
months = ['Jan', 'Feb', 'Mar', 'Apr', 'May']
revenue = [10000, 15000, 12000, 18000, 20000]
Example
# Horizontal bar
plt.barh(x, y)
plt.show()
Example
# Calculate the average tip amount for each day of the week
avg_tip_by_day = tips.groupby('day')['tip'].mean()
Example
# Load the 'tip' dataset from seaborn
tips = sns.load_dataset('tips')
Example
Example
Example
# Plot 4: Histogram
axs[1, 1].hist(data4, bins=10)
axs[1, 1].set_xlabel('Total Bill')
axs[1, 1].set_ylabel('Frequency')
axs[1, 1].set_title('Distribution of Total Bills')
Example