File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 1515"""
1616
1717import matplotlib .pyplot as plt
18- from matplotlib .finance import quotes_historical_yahoo
18+ from matplotlib .finance import quotes_historical_yahoo_ochl
1919from matplotlib .dates import YearLocator , MonthLocator , DateFormatter
2020import 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 )
2323
24- years = YearLocator () # every year
25- months = MonthLocator () # every month
24+ years = YearLocator () # every year
25+ months = MonthLocator () # every month
2626yearsFmt = DateFormatter ('%Y' )
2727
28- quotes = quotes_historical_yahoo (
28+ quotes = quotes_historical_yahoo_ochl (
2929 'INTC' , date1 , date2 )
3030if len (quotes ) == 0 :
3131 raise SystemExit
Original file line number Diff line number Diff line change 99import datetime
1010import matplotlib .pyplot as plt
1111from matplotlib .dates import MONDAY
12- from matplotlib .finance import quotes_historical_yahoo
12+ from matplotlib .finance import quotes_historical_yahoo_ochl
1313from matplotlib .dates import MonthLocator , WeekdayLocator , DateFormatter
1414
1515
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 )
1818
1919# every monday
20- mondays = WeekdayLocator (MONDAY )
20+ mondays = WeekdayLocator (MONDAY )
2121
2222# every 3rd month
23- months = MonthLocator (range (1 ,13 ), bymonthday = 1 , interval = 3 )
23+ months = MonthLocator (range (1 , 13 ), bymonthday = 1 , interval = 3 )
2424monthsFmt = DateFormatter ("%b '%y" )
2525
2626
27- quotes = quotes_historical_yahoo ('INTC' , date1 , date2 )
27+ quotes = quotes_historical_yahoo_ochl ('INTC' , date1 , date2 )
2828if len (quotes ) == 0 :
2929 print ('Found no quotes' )
3030 raise SystemExit
You can’t perform that action at this time.
0 commit comments