Skip to content

plotly 6.1.2.violinmode='group' does not work #5221

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
junjiecai opened this issue Jun 6, 2025 · 0 comments
Open

plotly 6.1.2.violinmode='group' does not work #5221

junjiecai opened this issue Jun 6, 2025 · 0 comments

Comments

@junjiecai
Copy link

junjiecai commented Jun 6, 2025

(Environment):
Plotly Version: 6.1.2
Python Version: 3.13.2
Operating System: macOS (Seqonia 15.2)

When using the violinmode='group', it just behave like violinmode='overlay'

Code to reproduce, just use the grouped violin plot example from official documentation

mport plotly.graph_objects as go

import pandas as pd

df = pd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/violin_data.csv")

fig = go.Figure()

fig.add_trace(go.Violin(x=df['day'][ df['sex'] == 'Male' ],
                        y=df['total_bill'][ df['sex'] == 'Male' ],
                        legendgroup='M', scalegroup='M', name='M',
                        line_color='blue')
             )
fig.add_trace(go.Violin(x=df['day'][ df['sex'] == 'Female' ],
                        y=df['total_bill'][ df['sex'] == 'Female' ],
                        legendgroup='F', scalegroup='F', name='F',
                        line_color='orange')
             )

fig.update_traces(box_visible=True, meanline_visible=True)
fig.update_layout(violinmode='group')
fig.show()

Expected Behavior:

Image

Actual Behavior:
In 6.1.2, "group" give the same result with "overlay"

Image

Additional Notes:
After I downgrade to 6.0.1, the same code works fine

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