Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 469e267

Browse files
committed
documentation corrections
1 parent e4fab5d commit 469e267

File tree

1 file changed

+29
-36
lines changed

1 file changed

+29
-36
lines changed

lib/matplotlib/finance.py

Lines changed: 29 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def parse_yahoo_historical_ochl(fh, adjusted=True, asobject=False):
8181
----------
8282
8383
adjusted : `bool`
84-
If True (default) replace open, high, low, close prices with
84+
If True (default) replace open, close, high, low prices with
8585
their adjusted values. The adjustment is by a scale factor, S =
8686
adjusted_close/close. Adjusted prices are actual prices
8787
multiplied by S.
@@ -178,7 +178,7 @@ def parse_yahoo_historical(fh, adjusted=True, asobject=False):
178178
----------
179179
180180
adjusted : `bool`
181-
If True (default) replace open, high, low, close prices with
181+
If True (default) replace open, close, high, low prices with
182182
their adjusted values. The adjustment is by a scale factor, S =
183183
adjusted_close/close. Adjusted prices are actual prices
184184
multiplied by S.
@@ -193,14 +193,14 @@ def parse_yahoo_historical(fh, adjusted=True, asobject=False):
193193
If False (default for compatibility with earlier versions)
194194
return a list of tuples containing
195195
196-
d, open, high, low, close, volume
196+
d, open, close, high, low, volume
197197
198198
If None (preferred alternative to False), return
199199
a 2-D ndarray corresponding to the list of tuples.
200200
201201
Otherwise return a numpy recarray with
202202
203-
date, year, month, day, d, open, high, low, close,
203+
date, year, month, day, d, open, close, high, low,
204204
volume, adjusted_close
205205
206206
where d is a floating poing representation of date,
@@ -230,12 +230,6 @@ def _parse_yahoo_historical(fh, adjusted=True, asobject=False,
230230
"""Parse the historical data in file handle fh from yahoo finance.
231231
232232
233-
This function has been deprecated in 1.4 in favor of
234-
`parse_yahoo_historical_ochl`, which maintains the original argument
235-
order, or `parse_yahoo_historical_ohlc`, which uses the
236-
open-high-low-close order. This function will be removed in 1.5
237-
238-
239233
Parameters
240234
----------
241235
@@ -257,6 +251,12 @@ def _parse_yahoo_historical(fh, adjusted=True, asobject=False,
257251
258252
d, open, high, low, close, volume
259253
254+
or
255+
256+
d, open, close, high, low, volume
257+
258+
depending on `ochl`
259+
260260
If None (preferred alternative to False), return
261261
a 2-D ndarray corresponding to the list of tuples.
262262
@@ -275,7 +275,7 @@ def _parse_yahoo_historical(fh, adjusted=True, asobject=False,
275275
very similar to the Bunch.
276276
277277
ochl : `bool`
278-
Temporary argument to select between ochl and ohlc ordering.
278+
Selects between ochl and ohlc ordering.
279279
Defaults to True to preserve original functionality.
280280
281281
"""
@@ -732,16 +732,19 @@ def _plot_day_summary(ax, quotes, ticksize=3,
732732
----------
733733
ax : `Axes`
734734
an `Axes` instance to plot to
735-
quotes : sequence of (time, open, high, low, close, ...) sequences
735+
quotes : sequence of quote sequences
736736
data to plot. time must be in float date format - see date2num
737+
(time, open, high, low, close, ...) vs
738+
(time, open, close, high, low, ...)
739+
set by `ochl`
737740
ticksize : int
738741
open/close tick marker in points
739742
colorup : color
740743
the color of the lines where close >= open
741744
colordown : color
742745
the color of the lines where close < open
743746
ochl: bool
744-
temporary argument to select between ochl and ohlc ordering
747+
argument to select between ochl and ohlc ordering of quotes
745748
746749
Returns
747750
-------
@@ -809,7 +812,7 @@ def candlestick(ax, quotes, width=0.2, colorup='k', colordown='r',
809812
----------
810813
ax : `Axes`
811814
an Axes instance to plot to
812-
quotes : sequence of (time, open, high, low, close, ...) sequences
815+
quotes : sequence of (time, open, close, high, low, ...) sequences
813816
As long as the first 5 elements are these values,
814817
the record can be as long as you want (eg it may store volume).
815818
@@ -852,7 +855,7 @@ def candlestick_ochl(ax, quotes, width=0.2, colorup='k', colordown='r',
852855
----------
853856
ax : `Axes`
854857
an Axes instance to plot to
855-
quotes : sequence of (time, open, high, low, close, ...) sequences
858+
quotes : sequence of (time, open, close, high, low, ...) sequences
856859
As long as the first 5 elements are these values,
857860
the record can be as long as you want (eg it may store volume).
858861
@@ -932,12 +935,11 @@ def _candlestick(ax, quotes, width=0.2, colorup='k', colordown='r',
932935
----------
933936
ax : `Axes`
934937
an Axes instance to plot to
935-
quotes : sequence of (time, open, high, low, close, ...) sequences
936-
As long as the first 5 elements are these values,
937-
the record can be as long as you want (eg it may store volume).
938-
939-
time must be in float days format - see date2num
940-
938+
quotes : sequence of quote sequences
939+
data to plot. time must be in float date format - see date2num
940+
(time, open, high, low, close, ...) vs
941+
(time, open, close, high, low, ...)
942+
set by `ochl`
941943
width : float
942944
fraction of a day for the rectangle width
943945
colorup : color
@@ -947,7 +949,7 @@ def _candlestick(ax, quotes, width=0.2, colorup='k', colordown='r',
947949
alpha : float
948950
the rectangle alpha level
949951
ochl: bool
950-
temporary argument to select between ochl and ohlc ordering
952+
argument to select between ochl and ohlc ordering of quotes
951953
952954
Returns
953955
-------
@@ -1040,12 +1042,7 @@ def plot_day_summary2(ax, opens, closes, highs, lows, ticksize=4,
10401042
a list of lines added to the axes
10411043
"""
10421044

1043-
warnings.warn("This function has been deprecated in 1.4 in favor "
1044-
"of `plot_day_summary2_ochl`, "
1045-
"which maintains the original argument order, "
1046-
"or `plot_day_summary2_ohlc`, "
1047-
"which uses the open-high-low-close order. "
1048-
"This function will be removed in 1.5", mplDeprecation)
1045+
warnings.warn(_warn_str.format(fun='plot_day_summary2'), mplDeprecation)
10491046
return plot_day_summary2_ohlc(ax, opens, highs, lows, closes, ticksize,
10501047
colorup, colordown)
10511048

@@ -1278,12 +1275,8 @@ def candlestick2(ax, opens, closes, highs, lows, width=4,
12781275
ret : tuple
12791276
(lineCollection, barCollection)
12801277
"""
1281-
warnings.warn("This function has been deprecated in 1.4 in favor"
1282-
"of `candlestick_ochl`,"
1283-
"which maintains the original argument order,"
1284-
"or `candlestick_ohlc`,"
1285-
"which uses the open-high-low-close order."
1286-
"This function will be removed in 1.5", mplDeprecation)
1278+
warnings.warn(_warn_str.format(fun='candlestick2'),
1279+
mplDeprecation)
12871280

12881281
candlestick2_ohlc(ax, opens, highs, lows, closes, width=width,
12891282
colorup=colorup, colordown=colordown,
@@ -1304,12 +1297,12 @@ def candlestick2_ohlc(ax, opens, highs, lows, closes, width=4,
13041297
an Axes instance to plot to
13051298
opens : sequence
13061299
sequence of opening values
1307-
closes : sequence
1308-
sequence of closing values
13091300
highs : sequence
13101301
sequence of high values
13111302
lows : sequence
13121303
sequence of low values
1304+
closes : sequence
1305+
sequence of closing values
13131306
ticksize : int
13141307
size of open and close ticks in points
13151308
colorup : color

0 commit comments

Comments
 (0)