@@ -532,11 +532,43 @@ def candlestick_ochl(ax, opens, closes, highs, lows, width=4,
532
532
return value is lineCollection, barCollection
533
533
"""
534
534
535
- candlestick_ohlc (ax , opens , closes , highs , lows , width = width ,
535
+ candlestick_ohlc (ax , opens , highs , closes , lows , width = width ,
536
536
colorup = colorup , colordown = colordown ,
537
537
alpha = alpha )
538
538
539
- candlestick2 = candlestick_ochl
539
+
540
+ def candlestick2 (ax , opens , closes , highs , lows , width = 4 ,
541
+ colorup = 'k' , colordown = 'r' ,
542
+ alpha = 0.75 ,
543
+ ):
544
+ """
545
+
546
+ Represent the open, close as a bar line and high low range as a
547
+ vertical line.
548
+
549
+ Preserves the original argument order.
550
+
551
+ ax : an Axes instance to plot to
552
+ width : the bar width in points
553
+ colorup : the color of the lines where close >= open
554
+ colordown : the color of the lines where close < open
555
+ alpha : bar transparency
556
+
557
+ return value is lineCollection, barCollection
558
+ """
559
+
560
+
561
+ warnings .warn ("This function has been deprecated in 1.3 in favor"
562
+ "of `candlestick_ochl`,"
563
+ "which maintains the original argument order,"
564
+ "or `candlestick_ohlc`,"
565
+ "which uses the open-high-low-close order."
566
+ "This function will be removed in 1.4" , mplDeprecation )
567
+
568
+
569
+ candlestick_ohlc (ax , opens , highs , lows , closes , width = width ,
570
+ colorup = colorup , colordown = colordown ,
571
+ alpha = alpha )
540
572
541
573
def candlestick_ohlc (ax , opens , highs , lows , closes , width = 4 ,
542
574
colorup = 'k' , colordown = 'r' ,
0 commit comments