Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Bar Plots: Hue | Gaining Insights with Data Visualization
Gaining Insights with Data Visualization

book
Bar Plots: Hue

Compito

Swipe to start coding

  1. Implement a more advanced bar plot by plotting the values of the 'day' column as the x variable and the values of the 'total_bill' as y.

Soluzione

import seaborn as sns
import matplotlib.pyplot as plt

# Setting plot style: grey grid in the background
sns.set(style='darkgrid')

# Loading the dataset
tips = sns.load_dataset('tips')

# Setting the figure size
plt.figure(figsize=(8, 8))

# Create a bar plot
sns.barplot(x='day', y='total_bill', hue='smoker', data=tips, errorbar=None);

Mark tasks as Completed
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 5
AVAILABLE TO ULTIMATE ONLY
some-alt