-
Notifications
You must be signed in to change notification settings - Fork 10
/
3. side.py
31 lines (25 loc) · 793 Bytes
/
3. side.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import codecademylib
from matplotlib import pyplot as plt
drinks = ["cappuccino", "latte", "chai", "americano", "mocha", "espresso"]
sales1 = [91, 76, 56, 66, 52, 27]
sales2 = [65, 82, 36, 68, 38, 40]
#Paste the x_values code here
n = 1 # This is our first dataset (out of 2)
t = 2 # Number of dataset
d = 6 # Number of sets of bars
w = 0.8 # Width of each bar
store1_x = [t*element + w*n for element
in range(d)]
plt.bar(store1_x, sales1)
#Paste the x_values code here
n = 2 # This is our second dataset (out of 2)
t = 2 # Number of dataset
d = 6 # Number of sets of bars
w = 0.8 # Width of each bar
store2_x = [t*element + w*n for element
in range(d)]
plt.bar(store2_x, sales2)
plt.show()
import pandas as pd
df = pd.DataFrame(store1_x, store2_x)
print(df)