Starbucks graph by Chatgpt
Mar 12, 2023
import seaborn as sns
import matplotlib.pyplot as plt
# Load Starbucks dataset from seaborn
df = sns.load_dataset(‘tips’)
# Create lm plot with seaborn
sns.lmplot(x=’total_bill’, y=’tip’, data=df)
# Set title and axis labels
plt.title(‘Tip vs. Total Bill at Starbucks’)
plt.xlabel(‘Total Bill ($)’)
plt.ylabel(‘Tip ($)’)
# Show the plot
plt.show()