Questions tagged [plotly.graph-objects]

88 questions
7
votes
2 answers

Animated 3D Surface Plots with Plotly

For research data visualisation I'd like to make an animated 3D surface plot in Plotly. The goal is to see the evolution of temperature in a box in function of time. But I don't know how to animate it. At this moment I only have my plot at a give…
Daunter
  • 71
  • 4
5
votes
0 answers

How do I show only the category tick, and rotate them, of a multicategory plotly bar chart

I wish to NOT show the inner category label in a multi-catogory bar chart using plotly graph-objects Further, I wish to rotate the label of the outer category label This is my code import pandas as pd import plotly.graph_objects as go df =…
Timo
  • 103
  • 5
5
votes
2 answers

Plotly: How to show other values than counts for marginal histogram?

I am trying to create a linked marginal plot above the original plot, with the same x axis but with a different y axis. I've seen that in plotly.express package there are 4 options in which you can create marginal_x plot on a scatter fig, but they…
3
votes
1 answer

A legend marker for each unique texture in the same bar trace, with Plotly Graph Objects in Python

I have the following code as example: x=[1,2,3,4] y=[2,2,4,3] colors = ["blue","blue","orange","blue"] textures = ["","","x",""] myfig = go.Figure() myfig.add_trace(go.Bar(x=x ,y=y ,showlegend=True …
3
votes
1 answer

Allow user to sort table in dash (graph objects table)

I have created a dash app in which I am displaying a few tables. I cannot find how to allow the user to sort the table based on a value. I didn't find anyhting useful on their documentation. Can I create a custom function where a user can select a…
3
votes
1 answer

Plotly subplots and graph objects error: Trace type 'scatter3d' is not compatible with subplot type 'xy' at grid position

I get this error when I try to add_trace to a sunbplots. The plot is a graph objects object. fig = make_subplots(rows = len(dfbh['client'].value_counts().index.tolist()), cols = 1) scatbh = go.Scatter3d(x=dfbhtemp['x_local'], y=dfbhtemp['y_local'],…
tincan
  • 322
  • 2
  • 12
3
votes
1 answer

Add a Plotly Express trace to a Graph Objects go.Figure() with multiple traces?

I am trying to visualize timestamps from different pandas dataframes using plotly Graph Objects. After successfully adding traces as go.Scatter() plots, I would now like to add a px.timeline() plot as a trace. Is this generally possible? Here is my…
ChriSil
  • 33
  • 1
  • 6
3
votes
1 answer

How to Color Target Nodes in Sankey Diagram Python using Plotly?

I'm using plotly.graph_objects to build a Sankey diagram, and I'd like the target nodes to be the same color as the links that flow into them. An example of the code structure I have so far is: label = ['A', 'B', 'Z', 'Y', 'X'] source = [0, 0, 0, 1,…
griffm
  • 29
  • 2
3
votes
1 answer

Using plotly.graph_objects, is there way to trim or wrap the label text inside of each box when the box is too small?

If you look here: https://plotly.com/python/treemaps/#nested-layers-in-treemap, looking at the image: Note the tiny text in the second small block. You can hardly see it because the text is "Blackcurrant-like", and it's too big to fit. None of the…
zumalifeguard
  • 8,648
  • 5
  • 43
  • 56
3
votes
1 answer

Is it possible to reverse bullet charts in plotly?

I created a bullet chart with a negative and positive dimension in plotly.go. However, when plotting my bar it always starts from -1. Is there a way to set the starting point at zero, so it can align in both dimensions from there? Reproducable…
2
votes
2 answers

Plotly: How to avoid drag on x axis

I need to prevent the dragging on the x axis (the one that moves the axis and its curves), but without loosing the zoom feature (selecting an area on the graph). I've found exactly this question on Plotly forum, but there aren't answers. Copying the…
2
votes
0 answers

Plotly graph objects returns error when trying to export the plot despite the graph being plotted without any errors

I tried to make a plot and save it as svg. When I run the code that makes the plot (I'm using Jupyter), it makes the plot, and everything works fine. However, if I try to save it as svg the program returns ValueError: ValueError: Transform failed…
Azamat
  • 121
  • 2
2
votes
1 answer

How to target a specific trace in pie chart by name when using update_traces() selector attribute?

The idea is to change the hover template only in the "Resto" trace. Here is a reproducible example: df_stack = pd.DataFrame({"Country": ['Brasil','China','Estados unidos','Chile','India','Paises bajos','Vietnam','Peru','Corea, republica…
2
votes
0 answers

How to change yaxis title position in plotly

I'm trying to imitate this plot using pyplot and I've run into a problem. I want my y axis title to be on top of y axis instead of middle. Here's code for y axis and current look of my plot (arrow points into place where I want it to…
Klucze
  • 49
  • 4
2
votes
0 answers

Plotly: Parallel Coordinate Plot cutting off axis labels

I'm using the Parallel Coordinates Plot from Plotly graph_object (by using their tutorial) but I cannot seem to get the left and right hand side axis labels to not be cut off: Here is my code for the layout: """ Define app layout """ app.layout…
Penguines
  • 53
  • 3
1
2 3 4 5 6