matplotlib / matplotlib/mplfinance
Multiple candles on same plot
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 678
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I appreciate your work!
How would I plot multiple candles together side by side on the same figure?
I want to compare 1. original data, 2. modified data side by side.
So for each x value there will be 2 candles.
My first attempt was scale the width and maybe offset each candle to the side. But I could not find any option to do that.

It would be nice to have horizontal_offset keyword to place candles offset from the centre. Is what I want to achieve possible?
Hopefully I want to achieve the same with volume plot too.
If it is not possible, how about having two separate scale width for each? The candles will still be overlapped but at least they can be distinguished.
`plot2 = fplt.make_addplot(data2,type='candle')`
`fplt.plot(data, type='candle', style=s, volume=True, addplot=plot2, scale_width_adjustment=dict(candle=0.5))`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the fplt.make_addplot and fplt.plot calls shown in the issue, then trace how candle addplots and scale_width_adjustment are handled. Define and implement a supported way to display original and modified candles side by side, including the requested volume behavior, and verify that both datasets are visibly distinguishable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matplotlib, python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100