We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9c64ca commit 78a9669Copy full SHA for 78a9669
1 file changed
Python_7_Plot_Histogram.py
@@ -0,0 +1,28 @@
1
+# -*- coding: utf-8 -*-
2
+"""
3
+Created on Fri Nov 27 08:09:11 2020
4
+
5
+@author: Tin
6
7
+# Plot Histogram
8
+import matplotlib.pyplot as plt
9
+import yfinance as yf
10
+yf.pdr_override()
11
12
13
+# input
14
+symbol = 'AAPL'
15
+start = '2019-01-01'
16
+end = '2020-01-01'
17
18
19
+# dataframe
20
+data = yf.download(symbol,start,end)
21
22
+plt.figure(figsize=(14,10))
23
+plt.bar(data.index, data['Adj Close'])
24
+plt.title("Stock Histogram Chart")
25
+plt.xlabel("Date")
26
+plt.ylabel("Price")
27
+plt.show()
28
0 commit comments