Skip to content

Fix volume bar border colors when using make_marketcolors#698

Open
wavebyrd wants to merge 864 commits intomatplotlib:masterfrom
wavebyrd:fix-volume-border-colors
Open

Fix volume bar border colors when using make_marketcolors#698
wavebyrd wants to merge 864 commits intomatplotlib:masterfrom
wavebyrd:fix-volume-border-colors

Conversation

@wavebyrd
Copy link

Summary

Fixes #676.

When make_marketcolors() is called with custom volume colors, it replaces marketcolors['volume'] with the new dict but leaves marketcolors['vcedge'] still pointing to the old base style value. In plotting.py, the check mc['volume'] == mc['vcedge'] then evaluates to False, so the auto-darkening logic for volume bar edges is skipped. Instead, the old base style colors leak through as edge colors, producing the inconsistent borders described in the issue.

The fix keeps vcedge in sync with volume whenever volume colors are changed in make_marketcolors(), matching the same pattern used by _validate_style() in _styledata/__init__.py.

Test plan

add input requirement

checkout based on input reference

test cat _version.py file

test publish

use publish v1 (instead of release/v1), and p3.x instead of p3.9

apparently @release/v1 is needed (not just @v1)

now try twine

publishTestPyPI and publishPyPI workflows
GitHub Actions workflows to deploy package to PyPI and TestPyPI
add status badge for mplfinance checks
Minor Changes to README, to Workflow, and change Dev Status from alpha to beta
Adding edgecolors and linewidths **for `type=scatter`**
Support `marketcolors` kwarg in `make_addplot()`
DrChandrakant and others added 29 commits June 12, 2023 18:51
As Per Suggestion All Exam Update
- Used OHLCV Data Only
- Calculation Within Notebook
- Detail Description Calculation
- Details mplfinance function used
add scratch work from issue436 and stackoverflow 75737197
move indicator examples into indicator directory
Style Enhancements, and add styles from Chandrakant
API for adding labels: `mpf.make_addplot(..., label="myLabel")`
some clarification on fork/clone workflow.
regenerate price-movements notebook, and other cleanup
When make_marketcolors() is called with custom volume colors, it
updates marketcolors['volume'] but leaves marketcolors['vcedge']
pointing to the old base style value. This causes the equality check
in plotting.py (mc['volume'] == mc['vcedge']) to fail, so the
auto-darkening logic for volume bar edges is skipped and the old
base style colors are used instead.

Fix by syncing vcedge with volume whenever volume colors are changed
in make_marketcolors().

Fixes matplotlib#676
@rcomer
Copy link
Member

rcomer commented Mar 13, 2026

This account has been blocked from the Matplotlib organisation for automating PRs matplotlib/matplotlib#31296 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug Report: Inconsistent Volume Bar Border Colors Between v0.12.9b7 and v0.12.10b0 When Using make_marketcolors