During horizontal scrolling, sometimes daily candles disappear
See original GitHub issueHi,
when the resolution of the plot is at the point where the daily candles are just visible, I observe their candle bodies to disappear during horizontal scrolling.
It would be very helpful if they would be visible in all situations.
Please find below the code and the referring video.
Thanks in advance!
code
#!/usr/bin/env python3
from datetime import date, timedelta
import finplot as fplt
import pandas as pd
import scipy.optimize
import yfinance as yf
now = date.today()
start_day = now - timedelta(days=59)
df = yf.download('GOOG', start_day.isoformat(), now.isoformat(), interval='5m')
import pytz
fplt.display_timezone = pytz.timezone('UTC')
# resample to daily candles, i.e. five 90-minute candles per business day
dfd = df.Open.resample('D').first().to_frame()
dfd['Close'] = df.Close.resample('D').last()
dfd['High'] = df.High.resample('D').max()
dfd['Low'] = df.Low.resample('D').min()
ax = fplt.create_plot('Alphabet Inc.', rows=1)
# plot down-sampled daily candles first
if True:
daily_plot = fplt.candlestick_ochl(dfd.dropna(), candle_width=5)
daily_plot.colors.update(dict(bull_body='#bfb', bull_shadow='#ada', bear_body='#fbc', bear_shadow='#dab'))
daily_plot.x_offset = 3.03 # resample() gets us start of day, offset +1.1 (gap+off center wick)
# plot high resolution on top
fplt.candlestick_ochl(df[['Open', 'Close', 'High', 'Low']])
fplt.autoviewrestore(True)
fplt.show()
video + .ini file:
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Cells disappearing with horizontal scrolling in UICollectionView
When initializing C's UICollectionViewFlowLayout scroll direction property to .horizontal , and scrolling past the second cell, C's cells ...
Read more >Windows Tip: How To Stop The Disappearing Scroll Bar
Go to Settings / Ease of Access / Display and turn off Automatically hide scroll bars in Windows. Scroll bars will then always...
Read more >Copyright, cost, and ageing code: why some games disappear ...
But ageing code and connectivity issues aren't just for large-scale online service games. Released in 2015 by Dejobaan Games, Elegy For A Dead ......
Read more >Horizontal Scrolling in Web Design: How to Do It Well
Horizontal scrolling can be achieved by clicking and dragging a horizontal scroll bar, swiping sideways on a desktop trackpad or trackpad mouse, ...
Read more >How To End A Curse - Trailer Eksperten
At your touch, all curses affecting one creature or object end. Pray this daily or as frequently as you can. Place the candle...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That is Qt not repainting things that ever went off-screen. I’ll see what I can do to circumvent.
Thanks a lot.
That fix seems to solve the missing candles when moving slowly!
Very good! 👍