Feature Request: New style called binance-dark
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 38/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- matplotlib, python
调研方向
该 issue 提供了一个拟议的 binance_dark 样式字典和一个 mpf.plot 使用示例,但没有指定源文件或测试。首先定位 mplfinance 如何定义并公开 binance 等现有样式,然后将渲染出的图表与附带的预览进行比较。当新样式可通过该库使用,并能生成所要求的深色蜡烛图时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
I would like to suggest the addition of a new style for the mplfinance library. The addition of this feature will improve the plot styles since there isn't a good dark style plot yet and will provide a better user experience.
I have copied the binance dark theme color scheme and code it, so I would like to propose a new style called binance_dark or somethink similar in addition to the binance style. Nevetheless, the style could be definitely be improved even more yet I would like to make the first step.
Additional context
Here is an example code snippet that demonstrates how this feature can be implemented:
binance_dark = {
"base_mpl_style": "dark_background",
"marketcolors": {
"candle": {"up": "#3dc985", "down": "#ef4f60"},
"edge": {"up": "#3dc985", "down": "#ef4f60"},
"wick": {"up": "#3dc985", "down": "#ef4f60"},
"ohlc": {"up": "green", "down": "red"},
"volume": {"up": "#247252", "down": "#82333f"},
"vcedge": {"up": "green", "down": "red"},
"vcdopcod": False,
"alpha": 1,
},
"mavcolors": ("#ad7739", "#a63ab2", "#62b8ba"),
"facecolor": "#1b1f24",
"gridcolor": "#2c2e31",
"gridstyle": "--",
"y_on_right": True,
"rc": {
"axes.grid": True,
"axes.grid.axis": "y",
"axes.edgecolor": "#474d56",
"axes.titlecolor": "red",
"figure.facecolor": "#161a1e",
"figure.titlesize": "x-large",
"figure.titleweight": "semibold",
},
"base_mpf_style": "binance-dark",
}
can = pd.read_csv("data1.csv", parse_dates=True, index_col=0)
# Plot the candlestick chart
mpf.plot(
can,
type="candle",
style=binance_dark,
title="BTCUSDT",
ylabel="Price ($)",
ylabel_lower="Volume",
volume=True,
mav=(2, 4, 6),
update_width_config=dict(candle_linewidth=0.5, candle_width=0.5),
)
Here is a preview of how the style of the plot looks like

- 主要语言
- Python
- 星标
- 4.4k
- 派生
- 678
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
matplotlib/mplfinance 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
matplotlib/mplfinance#672 ·
-
难度 5/5 一周以上 新手友好度 10/100
matplotlib/mplfinance#700 ·
-
enhancement
难度 5/5 一周以上 新手友好度 30/100
matplotlib/mplfinance#695 ·
-
question
难度 3/5 1-2 天 新手友好度 25/100
matplotlib/mplfinance#691 · 1 条评论 ·
-
question
难度 4/5 3-5 天 新手友好度 52/100
matplotlib/mplfinance#690 · 5 条评论 ·
查看 matplotlib/mplfinance 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
stephrobert/dsoxlab#238 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
sublimehq/package_control#1780 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 70/100
nwg-piotr/nwg-displays#145 ·