matplotlib / matplotlib/mplfinance

Support for ununiformly spaced data

オープン
#393 コメント 10 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

enhancement
主要言語
Python
スター
4.4k
フォーク
678
PR マージ指標
30日以内にマージされた PR はありません

説明

Hello,

Today I tried to plot data for which the time column was not uniformly spaced, there is the result:

mpl-bug

Corresponding data:

                         Open      High       Low     Close        Volume
Date                                                                     
2021-01-10 16:43:50       NaN       NaN       NaN       NaN      0.000000
2021-01-10 16:49:40       NaN       NaN       NaN       NaN      0.000000
2021-01-10 16:57:28  0.339755  0.339755  0.339755  0.339755   2489.423910
2021-01-10 17:05:17  0.337448  0.337448  0.334059  0.334627  15050.000000
2021-01-10 17:10:20  0.335243  0.336025  0.335243  0.336025   3213.676925
2021-01-10 17:17:21  0.336025  0.336025  0.324992  0.324992  28470.776438
2021-01-10 17:24:09  0.326430  0.326905  0.326430  0.326905   1989.542713
2021-01-10 17:31:11       NaN       NaN       NaN       NaN      0.000000
2021-01-10 17:36:33  0.323282  0.324741  0.318373  0.323247  46563.285561
2021-01-10 17:43:19  0.323247  0.328985  0.323247  0.328985  19099.188282
2021-01-10 17:50:08       NaN       NaN       NaN       NaN      0.000000
2021-01-10 17:54:13       NaN       NaN       NaN       NaN      0.000000
2021-01-10 18:00:22  0.335203  0.336286  0.334394  0.334394  26723.586340
2021-01-10 18:07:07  0.333296  0.333296  0.331800  0.331800   6210.287422
2021-01-10 18:14:16  0.334205  0.334205  0.334205  0.334205   5037.527533
2021-01-10 18:21:39  0.333101  0.333101  0.333101  0.333101   1308.452131
2021-01-10 18:28:06  0.331582  0.331582  0.331582  0.331582   5000.000000
2021-01-10 18:34:04  0.328742  0.328742  0.328742  0.328742   6832.647206
2021-01-10 18:42:57  0.330514  0.330514  0.330514  0.330514   6000.000000
2021-01-10 18:49:21       NaN       NaN       NaN       NaN      0.000000

We can see two problems:

  • The candles' widths are not proportional to the duration of each row.
  • The volumes widths are not proportional to the duration of each row, and worse, the volume bars may overlap with their neighbors.

It would be nice to be able to handle this case natively with mplfinance.

Note: The use case is to inspect transactions inside blocks in a given blockchain (e.g. Bitcoin, Ethereum). The mining time is not constant.

Thank you!

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

この issue にはサンプルデータと画像が用意されていますが、ソースファイル、テスト、エントリーポイントは示されていません。まずローソク足と出来高のプロットコードを見つけ、次に不規則な時間間隔に比例した幅を対象とし、隣接する出来高バーが重ならないことを保証するテストを定義してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
matplotlib, python
領域
data-visualization
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。