matplotlib / matplotlib/mplfinance
Support `fill_between` in "External Axes" Mode. And Support multiple `fill_between`s
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 678
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
in "External Axes Method", the 'fill_between' function does not work.
**To Reproduce**
`import mplfinance as mpf
idf = pd.read_csv('data/SPY_20110701_20120630_Bollinger.csv',index_col=0,parse_dates=True)
fig = mpf.figure(style='yahoo',figsize=(7,8))
ax1 = fig.add_subplot(2,1,1)
ax2 = fig.add_subplot(2,1,2)
mpf.plot(idf,ax=ax1,volume=ax2,fill_between=130)
`
**Expected behavior**
An candlestick plot with shaded region at prices 0-130.
**Screenshots**

**Desktop (please complete the following information):**
- OS: Windows 10, python 3.8, Spyder
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 by running the provided Python reproduction with the SPY Bollinger CSV and inspect how external axes are handled alongside the fill_between option. Done means the shaded 0–130 region appears in external-axes mode and multiple fill_between specifications are supported without breaking the candlestick plot.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matplotlib, python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100