96 questions
1
vote
1
answer
55
views
How to order barplot by value and enforce legend order at the same time?
I'm trying to create a bar plot where my legend appears in a particular order (Asia, Europe, Africa). I also want the bar plot to be ordered by Value, another column in my dataframe.
To solve this, I ...
0
votes
2
answers
61
views
How do I set custom axis titles for a go.Figure()?
I have a graph objects Figure and I want to set custom axis titles. I've found how to do it with update_layout() for plotly express figures, but I haven't found a way to do it with a go.Figure(). (...
0
votes
1
answer
54
views
How to make bars more visible while using plotly?
I am trying to plot some data using plotly graph_objects. X axis has dates as categories and Y axis has depth values. I realized my graph becomes less visible when there is a relevant quantity of data....
3
votes
0
answers
52
views
How to assign colors in go.Cone based on a single column of a DataFrame instead of the total magnitude calculated by default?
I’m working with Plotly’s go.Cone function to visualize 3D data. In my plot, I’m representing cones with positions (x, y, z) and directions (u, v, w), where the components u, v, and w correspond to ...
0
votes
0
answers
158
views
save plotly graph objects as PNG
I am trying to save a graph objects fig as a PNG (or any other format) but it seems to hang and not do anything
I have tried
import plotly.graph_objects as go
fig = go.Figure(
data=[go.Bar(x=[1, ...
0
votes
1
answer
1k
views
How to change the size and spacing of Plotly's sublopts?
How is it possible to manipulate the spacing between rows(e.g. increasing the space between fist two rows and final two rows) and the size of charts inside the figure (e.g. making pie chart bigger)?
...
3
votes
0
answers
189
views
How to group data and also specify the percentiles in a go.box?
I am trying to achieve a plotly Figure like the following furthier down but instead of the whiskers to show the min and max, I want the percentiles 10th and 90th and I cannot figure a way to make it ...
1
vote
1
answer
96
views
How to overlap “map A made by plotly.express with animation” on top of “map B made by plotly.graph_objects” and maintain the animation on map A?
As shown below, map A is created using plotly.express and map B using plotly.graph_objects.'
I’d like to ask to align and overlap map A on top of map B while keeping the animation on map A.
map A (...
0
votes
0
answers
61
views
Want to display q1, q3 by interpolation='linear' only in case of violin & box plotting
I want to display q1, q3 using concept of interpolation='linear' only in case of violin & box plots while using plotly.graph_objects.Box or Violin. I observed by default q1 and q3 are set using ...
0
votes
1
answer
425
views
Python plotly subplots with multiple columns
I have a code as below, which basically uses plotly and plots multiple columns of dataframe.
The below code works fine. But I want use this graph as a subplot. Imagine having 3 rows and 2 columns and ...
1
vote
1
answer
201
views
Display text outside of a trace not working
I am trying to display percentages outside of the bottom (dark orange) trace on my graph.
Here is my code:
bar2 = go.Figure()
bar2.add_trace(go.Bar(name = 'Halted Trials',
x = ...
1
vote
1
answer
63
views
Line colors exceed the define colorbar colorscale range, results in mismatch between linecolor and colorbar
Using plotly.graph_objects modules Scatter3D & scatter3d.Line I can't get the line colors to fall within the range of the define color scale.
I tried the following code, that plots points as ...
0
votes
0
answers
2k
views
Plotly Table ColumnWidth not making columns wider
Plotly docs says I can use go.Table and use key of columnwidth and an array with the widths. Well this isn't doing much because my columns are still cutoff and cannot be made wide enough.
Any ideas on ...
0
votes
1
answer
73
views
How to separate the color maps in plotly
Currently, I have a plot with 2 scatter plots. I have done this using graph_objects in plotly using the append_trace method. But the color scale of the 2 plots are overlapping as shown in the figure.
...
0
votes
0
answers
206
views
Why is my plotly figure drawing a wrong line?
I am making a ternary plot in plotly a needed to use graph_objects because express didn't support certain things I needed to do. While I was drawing a line on my plot. Plotly ignores one of the points ...
2
votes
1
answer
1k
views
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 ...
0
votes
0
answers
638
views
error in using FigureWidget() of the plotly.graph_objects
I would appreciate any assistance in resolving the below issue. i have tried to find a resolution to the error messages in existing questions (e.g., Import error in plotly while using FigureWidget) ...
0
votes
1
answer
510
views
Plotly - multiple labels on x axis
I have a dataset with columns for week and month respectively, and I would like to plot variable in time using both week and month as labels.
Can something like this be done with plotly in python?
...
0
votes
1
answer
163
views
set different colums size and number for each different row in plotly graph object subplots
I wonder if is possible to make a sublot with different columns size and number per each row USING PLOTLY.GRAPH_OBJECTS and PLOTLY.SUBPLOTS. like the photoes (sry for the hand made).
[img 1 row 1 has ...
1
vote
0
answers
83
views
python plotly - produce plot upon two clicks
Let's suppose I have a plotly graph_objects.Figure object containing a scatterplot:
y = np.random.rand(10)
x = np.random.rand(10)
names = ['A', 'B', 'C', 'D', 'E',
'F', 'G', 'H', 'I', 'L']
fig ...
0
votes
0
answers
275
views
In a Python Plotly bar chart with two y-axes, how do I add horizontal lines using values from both y-axes?
I created a graph object bar chart that has two different y-axes so that I can chart two different of different units for each category. However, now I'd like to add two horizontal lines. They won't ...
0
votes
1
answer
105
views
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)', '...
0
votes
1
answer
1k
views
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 ...
0
votes
0
answers
52
views
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(...
0
votes
1
answer
483
views
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(...