Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Unrenderable violin plot #5261

Open
Open
Labels
P2considered for next cyclebugsomething broken
@slambert-git

Description

@slambert-git

I have some example input here and a script for creating a violin plot. The plot writes without error but appears unrenderable, it never displays and will e.g., cause notebooks to crash.

Python 3.13.5plotly 6.0.1pandas 2.2.3
import pandas as pdimport plotly.express as pxfrom plotly.graph_objects import Figuredef create_plot(df: pd.DataFrame) -> Figure:    fig = px.violin(        df,        color='sample',        color_discrete_sequence=px.colors.qualitative.Safe,        y='value',        x='sample',        points=False,        box=True,        facet_col='metric',        facet_col_wrap=1,    )    fig.update_yaxes(matches=None)    fig.update_xaxes(matches=None)    fig.update_layout(height=400 * len(df['metric'].unique()))    return figif __name__ == '__main__':    file = 'df_melted.csv'    df = pd.read_csv(file)    fig = create_plot(df)    fig.write_html('test_plot.html')

Example input file is attached. The input is admittedly unusual for a violin plot (essentially all 0s or all 1s).

Thanks in advance!

df_melted.csv

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2considered for next cyclebugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp