Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4e0d0b2

Browse files
Merge pull request #631 from DanielGoldfarb/master
add scratch work from issue436 and stackoverflow 75737197
2 parents df73e85 + e77d7a6 commit 4e0d0b2

File tree

3 files changed

+1147
-5
lines changed

3 files changed

+1147
-5
lines changed

‎examples/scratch_pad/issues/issue436.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@
66
import mplfinance as mpf
77
import sys
88

9+
import matplotlib
10+
print('backend=',matplotlib.get_backend())
11+
912
coin = 'BTC'
1013
bot_status = 'trading'
1114

1215
def limit():
13-
timeout = 2.5
16+
timeout = 0.5
1417
print(end='')
1518
rlist, _, _ = select([sys.stdin], [], [], timeout)
16-
print('rlist=',rlist)
1719
if rlist:
1820
s = sys.stdin.readline().strip()
19-
print('s=',s)
2021
if s == 'g':
2122
print('033円[1;34m show chart')
2223
chart()
@@ -41,8 +42,8 @@ def dataframe():
4142

4243
def chart():
4344
df = dataframe()
44-
df.index = pd.DatetimeIndex(df['timestamp'])
45-
df = df.iloc[::-1]
45+
#df.index = pd.DatetimeIndex(df['timestamp'])
46+
#df = df.iloc[::-1]
4647
s = mpf.make_mpf_style(base_mpf_style='charles', gridcolor='#555555', gridstyle="--", rc={'axes.edgecolor': 'white', 'font.size': 5})
4748
fig, axlist = mpf.plot(df, type='candle', style=s, title= coin, ylabel = 'Price (€)', volume=True, warn_too_much_data=9999999, returnfig=True)
4849
mpf.show(block=True)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /