Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: New style called binance-dark #614

Open
juanmad opened this issue Apr 30, 2023 · 1 comment
Open

Feature Request: New style called binance-dark #614

juanmad opened this issue Apr 30, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@juanmad
Copy link

juanmad commented Apr 30, 2023

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

output

@juanmad juanmad added the enhancement New feature or request label Apr 30, 2023
@juanmad juanmad changed the title Feature Request: Feature Request: New style Binance-dark Apr 30, 2023
@juanmad juanmad changed the title Feature Request: New style Binance-dark Feature Request: New style binance-dark Apr 30, 2023
@juanmad juanmad changed the title Feature Request: New style binance-dark Feature Request: New style called binance-dark Apr 30, 2023
@DanielGoldfarb
Copy link
Collaborator

will do. thanks for contributing this.

DrChandrakant added a commit to DrChandrakant/mplfinance that referenced this issue Jun 7, 2023
Feature Request: New style called binance-dark matplotlib#614
DrChandrakant added a commit to DrChandrakant/mplfinance that referenced this issue Jun 9, 2023
DrChandrakant added a commit to DrChandrakant/mplfinance that referenced this issue Jun 9, 2023
Feature Request: New style called binance-dark matplotlib#614  style Created
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants