Questions tagged [plotly.graph-objects]

88 questions
2
votes
1 answer

Add slider to plotly heatmap animation- python

I want to add a slider to the heatmap animation. I have five different data frames (each for one frame). The data frame is as below: a b a 530 300 b NaN 200 c NaN 100 d 100 444 Each frame is actually time data. For simplicity, I…
sherin_a27
  • 153
  • 8
1
vote
2 answers

plotly - adding a Timeline using add_trace() to go.Figure object

I'm ultimately trying to add a px.timeline to a Figure containing a go.Scatter (similar to what they were doing here: Add a Plotly Express trace to a Graph Objects go.Figure() with multiple traces?). In doing this, the timeline doesn't show up. I've…
1
vote
1 answer

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 markers & lines by appending the respective "go.Scatter3D"…
1
vote
1 answer

Python Plotly: Coloring graph_object lines according to variable value?

I’m trying to plot multiple traces on one figure and color the lines according to a continuous color scale using plotly.graph_objects. I’m having trouble getting them to color correctly. Example below: import plotly.graph_objects as go import numpy…
sean412
  • 13
  • 2
1
vote
1 answer

How to adjust steps of y-axis

I have a plot in which I have two y-axis. The y-axis on the left represent the bar chart and the y-axis on the left represent the two lines. The problem is that the left y-axis currently creates individual steps for the y-axis values, which results…
1
vote
0 answers

How do I increase Plotly subplot title/chart separation

I have pie charts as subplots of a figure in the sample Python code shown. When plotted, the subplot titles are nearly touching the pie. What's the easiest way to add some space between the title ("title1" and "title2") and each chart? It would be…
1
vote
0 answers

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 = go.FigureWidget() fig.add_trace(go.Scatter( …
Sala
  • 480
  • 4
  • 19
1
vote
1 answer

plotly go Scattermapbox is not showing markers

I some how have encountered some odd bug. When i try to create a Scattermapbox the markers dont render. This bug came out of no where, It was working perfectly fine then my internet went out and now for the last 8 hours it has not been working. Ive…
1
vote
0 answers

3D plot Animation in plotly Python

x1, y1, z1 is 3D numpy array. Need to animate 3D figure in different position. fig = go.Figure(go.Scatter3d(x=[], y=[], z=[], mode="markers", marker=dict(color="red", size=10) …
1
vote
1 answer

Turn off visibility of axis and grids in python plotly "go.Scatter3d"

import numpy as np xx= np.array([[ 0, 0, 0], [ 0, 5, 0], [ 4, 5, -4], [ 4, 0, 0], [ 0, 0, -4], [ 0, 5, -4],[ 4, 5, 0], [ 4, 0, -4], [ 8, 5, -4], [ 8, 0, 0], [ 8, 5, 0], [ 8, 0, -4], [ 4, 10, -4], [ 4, 10, 0], [ 8,…
1
vote
1 answer

Connecting data points with lines in a Plotly boxplot in Python

I am working on some boxplots. I found this code very helpful and I managed to replicate it for my needs: import plotly.express as px import numpy as np import pandas as pd np.random.seed(1) y0 = np.random.randn(50) - 1 y1 = np.random.randn(50) +…
1
vote
1 answer

Does Plotly similar function like matplotlib fill_between

I am converting some matplotlib code to Plotly. Does Plotly have something similar to matplotlib fill_between Code to convert # ax.fill_between(fcst_t, fcst['yhat_lower'], fcst['yhat_upper'], # color='#0072B2',…
Alex Punnen
  • 5,287
  • 3
  • 59
  • 71
1
vote
0 answers

Is there a way to turn the sorting in a descending way on the y axis in Plotly?

I've created a program which sorts the highest 50 US airports with the most starts in year 2015 in a bar chart. Unfortunately, the program shows them in an ascending order with the lowest on top. Do you know a way how to turn them around? The data…
1
vote
1 answer

How to draw bounderies between countries and countries' states on pyplot.go.Figure with go.Scattergeo

So, I am doing a map that shows the flow of people among some cities in Brazil by drawing lines on the map, representing the path, and setting its opacity according to the count of occurrences. To do so, I am following this code (third map, the one…
Joao Donasolo
  • 359
  • 1
  • 9
1
vote
0 answers

How can I add a square with a text next to a chart (in Python/Plotly)

I prepared a page with charts, using graph object library. I'm trying to add a short information about the each chart on this screen, e.g. "Service Level", next to a chart (on left side). screen I would be grateful for any help :)
Przemek_s
  • 11
  • 1