Questions tagged [plotly.graph-objects]
88 questions
0
votes
1 answer
Having a hard time overlaying graphs with plotly.graph_objects
I tried to overlay a 'threashold' line on a bar graph but didn't managed to have a clean graph.
Here is my pandas DataFrame:
import pandas as pd
df = pd.DataFrame({'Nutriment' : ['Glucides (g)', 'Lipides (g)', 'Protéines (g)'],
'ail' : [4,…

Marie-Olive
- 5
- 2
0
votes
1 answer
Plotly Graph Objects set viewable size
I am trying to draw some squares in a ploty application. I realized that ploty sometimes decides the size of the viewable area based on the objects inside it (which makes sense) but other times its just fixed regardless of whats drawn. I want to…

Daniel Cruz
- 1,437
- 3
- 5
- 19
0
votes
0 answers
How to change figure size in python Plotly
i'm working with plotly.graph_objects to generate a 3D plot.
import plotly.graph_objects as go
import numpy as np
t = np.linspace(0,1,10)
fig = go.Figure(layout=go.Layout(width=1000, height=400))
fig.add_trace(go.Scatter3d(x=np.sin(t),…

Sala
- 480
- 4
- 19
0
votes
0 answers
Create customized dropdown in plotly go
I want to add percentage valued dropdown in plotly graph and after selection of option wanted to pass it to my function
um = [
dict(
active=-1,
buttons=list([
dict(label="40",
method="update",
…

Sonali Shelke
- 13
- 2
0
votes
1 answer
How to display the values above markers in plotly scatter graph object?
I can’t seem to find the argument to always display the scatter y values above the points in python plotly.
I tried to search for it and failed. I just want something like that hover number to always be on.

Fil B
- 11
0
votes
1 answer
How can i make some points of different color in last frame of plotly.graph_objects
fig = go.Figure()
f = []
hours = range(0, 60)
pts = [rd.randrange(11, 100, 13) for i in range(1, 61)]
for i in range(1, 61):
f.append(go.Frame(data=[go.Scatter(x=list(hours[1:61]), y=list(pts[:i]), name="PRB
…

Sonali Shelke
- 13
- 2
0
votes
1 answer
How to make plotly x-axis graph ticks show specific day of week
I am trying to format my x-axis ticks to show only "Mondays" on a series of graphs. The example below is an MRE but it is not what I am directly working on, but it is close enough (plotly example from https://plotly.com/python/heatmaps/). Now I know…

IDK
- 99
- 2
- 9
0
votes
0 answers
Why is the isosurface value inverted with the colorbar and true value in go.Isosurface?
I have a 3D volume matrix with pressure values describing the acoustic field generated by an ultrasound transducer.
Goal: plot the data with isosurfaces value on hover.
Method: use the go.Isosurfaces from plotly.graph_objects library.
Problem:…

cseabra
- 1
0
votes
0 answers
How do I return the lasso selected groups of a plotly plot in django?
I am trying to take the users lasso select in django to do something with the data they select.
The user selects points on plotly graph
They press a button on the webpage and the selected points are submitted
The data is processed in python
I…

Asa
- 19
- 4
0
votes
2 answers
Putting Linear Trendline on a Plotly Subplot
I wanted to know if there was an easier way I could put a linear regression line on a plotly subplot. The code I made below does not appear to be efficient and it makes it difficult to add annotations to the graph for the linear trendlines, which I…

dlnvss
- 71
- 1
- 8
0
votes
0 answers
Plotly Graph Objects Subplots - add_vrect not working
The vrect example at
[Time Series Regions with Rectangle Shapes]
[1]: https://plotly.com/python/shapes/#rectangles-positioned-relative-to-the-axis-data
does not work with subplots.
e.g. If the fig (Figure object) is constructed as go.Fugure() the…

pa3m
- 1
- 2
0
votes
1 answer
problem with inserting data into the bar chart plotly graph_objects
so I'm trying to add the lists ( Internal, External ..) to the bar chart but the data goes to one column "internal"
it is supposed to be similar to this
here is the whole df and the work I did

user19113361
- 13
- 1
- 3
0
votes
1 answer
How to plot more than 1 graph in 1 figure with 3D Mesh Plotly?
I have a problem with my plotting.
I want to plot multiple meshes in one graph, and each mesh is marked by label.
This is what the data looks like:
I only could plot 1 mesh. Please help.
this is my code (just one mesh) :
import numpy as np
import…

Bayu Setiawan
- 13
- 5
0
votes
1 answer
my go.Scatter text doesnt work but my figure does
I try to do some graphs with plotly.graph_object.
My figure works but not my text.
fig.add_trace(go.Scatter(x=[5,15,15,5],
y=[0,0,niveau_coupon[1], niveau_coupon[0]],
…

guiguilecodeur
- 429
- 2
- 15
0
votes
1 answer
Aproximating a point to a region fill in Plotly Scatter Region Fill
I am using plotly with Python, and I am trying to approach a point to the nearest region boundary considering either x or y axis.
import pandas as pd
import numpy as np
import plotly.graph_objects as go
def plot_graph5(points_x, points_y):
…

Lucas Ferreira
- 3
- 1