Skip to content

Commit c16dfda

Browse files
committedJan 9, 2021
Upload files
1 parent fa978c2 commit c16dfda

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
 

‎24_use_matplotlib.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from tkinter import *
2+
import numpy as np
3+
import matplotlib.pyplot as plt
4+
5+
root = Tk()
6+
root.title("weather")
7+
root.geometry("400x200")
8+
9+
10+
def graph():
11+
house_prices = np.random.normal(200000, 25000, 5000)
12+
plt.hist(house_prices, 300)
13+
plt.show()
14+
15+
16+
my_btn = Button(root, text="Graph It!", command=graph)
17+
my_btn.pack()
18+
19+
root.mainloop()

0 commit comments

Comments
 (0)
Please sign in to comment.