8000 pep8 fixed. plot_day_summary2 removed (retained by error when rebasing) · matplotlib/matplotlib@20966e9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 20966e9

Browse files
committed
pep8 fixed. plot_day_summary2 removed (retained by error when rebasing)
1 parent 2cbb326 commit 20966e9

File tree

1 file changed

+14
-52
lines changed

1 file changed

+14
-52
lines changed

lib/matplotlib/finance.py

Lines changed: 14 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ def candlestick_ohlc(ax, quotes, width=0.2, colorup='k', colordown='r',
736736

737737

738738
def _candlestick(ax, quotes, width=0.2, colorup='k', colordown='r',
739-
alpha=1.0, ochl=True):
739+
alpha=1.0, ochl=True):
740740

741741
"""
742742
Plot the time, open, high, low, close as a vertical line ranging
@@ -817,7 +817,7 @@ def _candlestick(ax, quotes, width=0.2, colorup='k', colordown='r',
817817

818818

819819
def _check_input(opens, closes, highs, lows, miss=-1):
820-
"""Checks that *opens*, *highs*, *lows* and *closes* have the same length.
820+
"""Checks that *opens*, *highs*, *lows* and *closes* have the same length.
821821
NOTE: this code assumes if any value open, high, low, close is
822822
missing (*-1*) they all are missing
823823
@@ -833,86 +833,48 @@ def _check_input(opens, closes, highs, lows, miss=-1):
833833
sequence of low values
834834
closes : sequence
835835
sequence of closing values
836-
miss:
836+
miss : int
837837
identifier of the missing data
838+
839+
Raises
840+
------
841+
ValueError
842+
if the input sequences don't have the same length
838843
"""
839844

840845
def _missing(sequence, miss=-1):
841846
"""Returns the index in *sequence* of the missing data, identified by
842847
*miss*
848+
843849
Parameters
844850
----------
845-
sequence:
851+
sequence :
846852
sequence to evaluate
847-
miss:
853+
miss :
848854
identifier of the missing data
849855
850856
Returns
851857
-------
852858
where_miss: numpy.ndarray
853859
indices of the missing data
854860
"""
855-
return np.where(np.array(sequence)==miss)[0]
861+
return np.where(np.array(sequence) == miss)[0]
856862

857863
same_length = (len(opens) == len(highs)) and (len(opens) == len(lows)) and\
858864
(len(opens) == len(closes))
859865
_missopens = _missing(opens)
860-
same_missing = (_missopens == _missing(highs)).all() and (_missopens ==\
866+
same_missing = (_missopens == _missing(highs)).all() and (_missopens ==
861867
_missing(lows)).all() and (_missopens == _missing(closes)).all()
862868

863869
if not (same_length and same_missing):
864870
msg = """
865-
*opens*, *highs*, *lows* and *closes* must have the same length.
871+
*opens*, *highs*, *lows* and *closes* must have the same length.
866872
NOTE: this code assumes if any value open, high, low, close is
867873
missing (*-1*) they all must be missing
868874
"""
869875
raise ValueError(msg)
870876

871877

872-
def plot_day_summary2(ax, opens, closes, highs, lows, ticksize=4,
873-
colorup='k', colordown='r',
874-
):
875-
"""Represent the time, open, close, high, low, as a vertical line
876-
ranging from low to high. The left tick is the open and the right
877-
tick is the close.
878-
879-
880-
This function has been deprecated in 1.4 in favor of
881-
`plot_day_summary2_ochl`, which maintains the original argument
882-
order, or `plot_day_summary2_ohlc`, which uses the
883-
open-high-low-close order. This function will be removed in 1.5
884-
885-
886-
Parameters
887-
----------
888-
ax : `Axes`
889-
an Axes instance to plot to
890-
opens : sequence
891-
sequence of opening values
892-
closes : sequence
893-
sequence of closing values
894-
highs : sequence
895-
sequence of high values
896-
lows : sequence
897-
sequence of low values
898-
ticksize : int
899-
size of open and close ticks in points
900-
colorup : color
901-
the color of the lines where close >= open
902-
colordown : color
903-
the color of the lines where close < open
904-
905-
Returns
906-
-------
907-
ret : list
908-
a list of lines added to the axes
909-
"""
910-
911-
warnings.warn(_warn_str.format(fun='plot_day_summary2'), mplDeprecation)
912-
return plot_day_summary2_ohlc(ax, opens, highs, lows, closes, ticksize,
913-
colorup, colordown)
914-
915-
916878
def plot_day_summary2_ochl(ax, opens, closes, highs, lows, ticksize=4,
917879
colorup='k', colordown='r',
918880
):

0 commit comments

Comments
 (0)
0