|
26 | 26 | from matplotlib.patches import Rectangle
|
27 | 27 | from matplotlib.transforms import Affine2D
|
28 | 28 |
|
| 29 | +from matplotlib import MatplotlibDeprecationWarning as mplDeprecation |
29 | 30 |
|
30 | 31 | cachedir = get_cachedir()
|
31 | 32 | # cachedir will be None if there is no writable directory.
|
@@ -374,11 +375,62 @@ def candlestick(ax, quotes, width=0.2, colorup='k', colordown='r',
|
374 | 375 | return lines, patches
|
375 | 376 |
|
376 | 377 |
|
377 |
| -def plot_day_summary2(ax, opens, highs, lows, closes ticksize=4, |
| 378 | +def plot_day_summary2(ax, opens, closes, highs, lows, ticksize=4, |
378 | 379 | colorup='k', colordown='r',
|
379 | 380 | ):
|
380 | 381 | """
|
381 | 382 |
|
| 383 | + Represent the time, open, close, high, low, as a vertical line |
| 384 | + ranging from low to high. The left tick is the open and the right |
| 385 | + tick is the close. |
| 386 | +
|
| 387 | + ax : an Axes instance to plot to |
| 388 | + ticksize : size of open and close ticks in points |
| 389 | + colorup : the color of the lines where close >= open |
| 390 | + colordown : the color of the lines where close < open |
| 391 | +
|
| 392 | + return value is a list of lines added |
| 393 | + """ |
| 394 | + |
| 395 | + warnings.warn("This function has been deprecated in 1.3 in favor" |
| 396 | + "of `plot_day_summary_ochl`," |
| 397 | + "which maintains the natural argument order," |
| 398 | + "or `plot_day_summary_ohlc`," |
| 399 | + "which uses the open-high-low-close order." |
| 400 | + "This function will be removed in 1.4", mplDeprecation) |
| 401 | + return plot_day_summary_ohlc(ax, opens, highs, lows, closes, ticksize, |
| 402 | + colorup, colordown) |
| 403 | + |
| 404 | + |
| 405 | +def plot_day_summary_ochl(ax, opens, closes, highs, lows, ticksize=4, |
| 406 | + colorup='k', colordown='r', |
| 407 | + ): |
| 408 | + |
| 409 | + """ |
| 410 | +
|
| 411 | + Represent the time, open, close, high, low, as a vertical line |
| 412 | + ranging from low to high. The left tick is the open and the right |
| 413 | + tick is the close. |
| 414 | +
|
| 415 | + ax : an Axes instance to plot to |
| 416 | + ticksize : size of open and close ticks in points |
| 417 | + colorup : the color of the lines where close >= open |
| 418 | + colordown : the color of the lines where close < open |
| 419 | +
|
| 420 | + return value is a list of lines added |
| 421 | + """ |
| 422 | + |
| 423 | + return plot_day_summary_ohlc(ax, opens, highs, lows, closes, ticksize, |
| 424 | + colorup, colordown) |
| 425 | + |
| 426 | + |
| 427 | + |
| 428 | +def plot_day_summary_ohlc(ax, opens, highs, lows, closes, ticksize=4, |
| 429 | + colorup='k', colordown='r', |
| 430 | + ): |
| 431 | + |
| 432 | + """ |
| 433 | +
|
382 | 434 | Represent the time, open, high, low, close as a vertical line
|
383 | 435 | ranging from low to high. The left tick is the open and the right
|
384 | 436 | tick is the close.
|
|
0 commit comments