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

Appearance settings

plotly on jupyter creates HUGE notebooks file sizes #5056

Copy link
Copy link
Closed
@urirosenberg

Description

@urirosenberg
Issue body actions

Hi, we are seeing an issue with plotly v6.0.0 where running in jupyter creates HUGE notebook files, resulting in crashed kernel and inability to save.

Sample code to reproduce the issue (full example can be found here):

import plotly.express as px
import plotly.graph_objects as go
import pandas as pd
import numpy as np

# Create sample data
dates = pd.date_range(start='2024-01-01', end='2024-12-31', freq='M')
values = np.random.randn(12).cumsum()
categories = ['A', 'B', 'C', 'D']
values_bar = [23, 45, 56, 78]

# Line Chart
fig1 = px.line(x=dates, y=values, 
               title='Monthly Trend 2024',
               labels={'x': 'Date', 'y': 'Value'})
fig1.show()

# Scatter Plot with custom styling
fig2 = go.Figure()
fig2.add_trace(go.Scatter(
    x=np.random.randn(100),
    y=np.random.randn(100),
    mode='markers',
    marker=dict(
        size=10,
        color=np.random.randn(100),
        colorscale='Viridis',
        showscale=True
    )
))
fig2.update_layout(title='Scatter Plot with Color Scale')
fig2.show()

# Bar Chart
fig3 = px.bar(x=categories, y=values_bar,
              title='Category Distribution',
              labels={'x': 'Category', 'y': 'Value'},
              color=values_bar,
              color_continuous_scale='Reds')
fig3.show()

Using plotly version 5.24.1, this generates a >1M file.
Using plotly version 6.0.0, this generates a 19M file.

Looking at the v6.0.0 notebook source json file, I see massive amounts of JS code.

Metadata

Metadata

Assignees

Labels

P1needed for current cycleneeded for current cyclebugsomething brokensomething brokenperformancesomething is slowsomething is slow

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.