8000 'closes' and 'lows' misplaced in candlestick chart · matplotlib/matplotlib@e178989 · GitHub
[go: up one dir, main page]

Skip to content

Commit e178989

Browse files
authored
'closes' and 'lows' misplaced in candlestick chart
'closes' and 'lows' are misplaced in candlestick2_ochl function, both in 1.5.1 and 2.* ( i don't know 1.4.* or below). This bug will cause mistakes while ploting, see my answer to this question on stackoverflow: http://stackoverflow.com/a/38684513/4117822 I work 2 hours debuging in 2 a.m. could anybody who saw this vote me up here? T_T
1 parent c9c2bfe commit e178989

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/finance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ def candlestick2_ochl(ax, opens, closes, highs, lows, width=4,
10511051
(lineCollection, barCollection)
10521052
"""
10531053

1054-
candlestick2_ohlc(ax, opens, highs, closes, lows, width=width,
1054+
candlestick2_ohlc(ax, opens, highs, lows, closes, width=width,
10551055
colorup=colorup, colordown=colordown,
10561056
alpha=alpha)
10571057

@@ -1139,8 +1139,8 @@ def candlestick2_ohlc(ax, opens, highs, lows, closes, width=4,
11391139
ax.autoscale_view()
11401140

11411141
# add these last
1142-
ax.add_collection(barCollection)
11431142
ax.add_collection(rangeCollection)
1143+
ax.add_collection(barCollection)
11441144
return rangeCollection, barCollection
11451145

11461146

0 commit comments

Comments
 (0)
0