Skip to content

df.hvplot.area(stacked=True, colors=[...]) gives different results for bokeh and matplotlib #1550

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

Open
1 task
kdheepak opened this issue Apr 24, 2025 · 0 comments

Comments

@kdheepak
Copy link

ALL software version info

Software Version Info
hv.__version__

1.20.2
Image

Description of expected behavior and the observed behavior

With bokeh:

Image

With matplotlib:

Image

Complete, minimal, self-contained example code that reproduces the issue

import holoviews as hv

hv.extension("matplotlib") 
# hv.extension("bokeh")

df = pd.DataFrame(
    {
        "Datetime": pd.to_datetime(
            [
                "2023-01-01 00:00:00",
                "2023-01-01 01:00:00",
                "2023-01-01 02:00:00",
                "2023-01-01 03:00:00",
                "2023-01-01 04:00:00",
            ]
        ),
        "Value": [1, 2, 3, 4, 5],
        "Value2": [5, 4, 3, 2, 1],
        "Value3": [2, 3, 4, 5, 6],
        "Value4": [6, 5, 4, 3, 2],
        "Value5": [3, 4, 5, 6, 7],
    }
)
area_plot = df.hvplot.area(
    stacked=True,
    alpha=0.7,
    color=["pink", "pink", "pink", "#d62728", "#9467bd"],
    xlabel="Datetime",
    ylabel="Value",
    legend=False,
    
)
area_plot

Stack traceback and/or browser JavaScript console output

Screenshots or screencasts of the bug in action

  • I may be interested in making a pull request to address this
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

No branches or pull requests

1 participant