question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A `validate=False` an option for `graph_objects` and `px` Figures?

See original GitHub issue

There’s already an issue outlining the effects graph_object validation has on plot generation time. Users can bypass this performance hit by replacing the graph_objects with dict and then display the plot with plotly.offline.iplot(fig, validate=False) or if they are creating graphs in Dash, they can forgo the plotly.py library altogether and just use a dict in their Graph component’s figure argument.

This solution can greatly improve the performance of Dash apps but it means that Dash users with expensive graphs have to choose between using px/plotly.py’s update methods and optimally fast code.

I wonder if a way to turn off validation, especially in Dash apps, would help Dash users get the best of both worlds.

cc @matthewchan15

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
alexcjohnsoncommented, Dec 6, 2022

I like the idea of a three-level approach: full validation (current behavior), top-level validation (don’t dig into data arrays or nested objects like GeoJSON), and no validation.

0reactions
ndrezncommented, Dec 9, 2022

(cc @red-patience / @LiamConnors on that last point maybe)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating and updating figures in Python - Plotly
Graph objects contain descriptions of each valid property as Python docstrings, with a full API reference available. You can use these docstrings in...
Read more >
Plotly: How to define colors in a figure using Plotly Graph ...
First, if an explanation of the broader differences between go and px is required, please take a look here and here.
Read more >
plotlywidget | Yarn - Package Manager
An optional skip_invalid argument has been added to the Figure and FigureWidget constructors. By default, skip_invalid is False and invalid figure properties ...
Read more >
Python Plotly tutorial - GeeksforGeeks
plotly.plotly; plotly.graph.objects; plotly.tools ... With px.line each data position is represented as a vertex (which location is given by ...
Read more >
Tutorial: Computations - Quarto
Quarto has a wide variety of options available for controlling how code and ... as px import plotly.io as pio gapminder = px.data.gapminder()...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found