File tree 2 files changed +12
-12
lines changed 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 15
15
"""
16
16
17
17
import matplotlib .pyplot as plt
18
- from matplotlib .finance import quotes_historical_yahoo
18
+ from matplotlib .finance import quotes_historical_yahoo_ochl
19
19
from matplotlib .dates import YearLocator , MonthLocator , DateFormatter
20
20
import datetime
21
- date1 = datetime .date ( 1995 , 1 , 1 )
22
- date2 = datetime .date ( 2004 , 4 , 12 )
21
+ date1 = datetime .date (1995 , 1 , 1 )
22
+ date2 = datetime .date (2004 , 4 , 12 )
23
23
24
- years = YearLocator () # every year
25
- months = MonthLocator () # every month
24
+ years = YearLocator () # every year
25
+ months = MonthLocator () # every month
26
26
yearsFmt = DateFormatter ('%Y' )
27
27
28
- quotes = quotes_historical_yahoo (
28
+ quotes = quotes_historical_yahoo_ochl (
29
29
'INTC' , date1 , date2 )
30
30
if len (quotes ) == 0 :
31
31
raise SystemExit
Original file line number Diff line number Diff line change 9
9
import datetime
10
10
import matplotlib .pyplot as plt
11
11
from matplotlib .dates import MONDAY
12
- from matplotlib .finance import quotes_historical_yahoo
12
+ from matplotlib .finance import quotes_historical_yahoo_ochl
13
13
from matplotlib .dates import MonthLocator , WeekdayLocator , DateFormatter
14
14
15
15
16
- date1 = datetime .date ( 2002 , 1 , 5 )
17
- date2 = datetime .date ( 2003 , 12 , 1 )
16
+ date1 = datetime .date (2002 , 1 , 5 )
17
+ date2 = datetime .date (2003 , 12 , 1 )
18
18
19
19
# every monday
20
- mondays = WeekdayLocator (MONDAY )
20
+ mondays = WeekdayLocator (MONDAY )
21
21
22
22
# every 3rd month
23
- months = MonthLocator (range (1 ,13 ), bymonthday = 1 , interval = 3 )
23
+ months = MonthLocator (range (1 , 13 ), bymonthday = 1 , interval = 3 )
24
24
monthsFmt = DateFormatter ("%b '%y" )
25
25
26
26
27
- quotes = quotes_historical_yahoo ('INTC' , date1 , date2 )
27
+ quotes = quotes_historical_yahoo_ochl ('INTC' , date1 , date2 )
28
28
if len (quotes ) == 0 :
29
29
print ('Found no quotes' )
30
30
raise SystemExit
You can’t perform that action at this time.
0 commit comments