Comments (3)
You should be able to do this using pandas.DataFrame.resample()
before passing the data into mpf.plot()
. Let me know if you need more detail.
from mplfinance.
Additional information here: Resampling Time Series Data with Pandas
from mplfinance.
Hello Daniel,
tank you, DataFrame.resample()
works great! I already coded a loop, but your way is better:
def adjust_candle_width(ticker_frame, sample_time='1D'):
adj_ticker_frame = ticker_frame.resample(sample_time).agg({
'Open': 'first',
'High': 'max',
'Low': 'min',
'Close': 'last',
'Volume': 'sum'
})
return adj_ticker_frame
from mplfinance.
Related Issues (20)
- I just don't know who to ask…. HOT 1
- mplfinance warn if user passes an empty data set. HOT 1
- Feature Request: The line width argument adding request for 'candlestick_ohlc' about the 'Wick/shadow' part(above/blow line) HOT 9
- Bug Report: marketcolors display error when open=close HOT 1
- Bug Report: Typo HOT 1
- How do I create a buy indicator using mplfinance? HOT 1
- Using with `matplotlib.testing.decorators.image_comparison` HOT 6
- PNF ATR Boxsize HOT 4
- Hollow and Filled Candles HOT 1
- Feature Request: Add SubFigures to Mpf_Figure HOT 2
- The example image of price-movement_plots.ipynb is inconsistent with the displayed result. HOT 3
- Interactive plots for OHLC candles with mplfinance HOT 1
- What is the most elegant way to implement ribbons? HOT 4
- Bug Report: legends on panels overlaps
- PnF Reversal Bug
- Bug Report: Errors occur for NaN columns.
- The use of `returnfig=True` creates multiple figures when using ipywidgets
- Custom Candlestick Timeframe HOT 2
- Bug Report: Inconsistent Volume Bar Border Colors Between v0.12.9b7 and v0.12.10b0 When Using make_marketcolors
- missing from current font. FigureCanvasAgg.draw(self)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mplfinance.