Questions tagged [plotly-python]

Use this tag for questions about the interactive graphing library for Python.

References:

2059 questions
0
votes
0 answers

How can I limit the shape of a contour map and make it non-rectangular in Plotly

I have a contour map representing pressure on which I added a line graph that represent the shape of the reservoir as shown below. How can I make the contour map to be only within the shape and to ignore outside shape?
0
votes
0 answers

How to make a plotly graph wider and higher?

I would like to make a vertical waterfall graph with plotly express. I have a lot of bars to display, that makes my chart unreadable. Is it possible to enlarge the height and width of a ploty graph, even if it means scrolling to visualize parts of…
Ewdlam
  • 875
  • 9
  • 28
0
votes
1 answer

Plotly Indicator how to show full number

I have a problem with an indicator from Plotly, below is my code: mode = "number+delta", value = 32000, number = {'prefix': "zł"}, delta = {'position': "top", 'reference': 32000, "valueformat": "f"}, domain = {'x': [0, 1], 'y':…
MatJablo
  • 27
  • 5
0
votes
2 answers

Plotly - python - How to loop through colors

I have a simple plot. How do I loop through colors in a list of rgb colors? import plotly.express as px X1 = [1,2,3] Y1 = [2,4,8] Z1 = [3,6,8] colors = ['rgb(255,0,0)','rgb(255,165,0)','rgb(0,0,255)'] cat = ['A','B','C'] figtest =…
Adrian
  • 177
  • 9
0
votes
1 answer

plotly-- Making multiple lines with checklist

I'm new in plotly. I'm making checklist with 2 lines vertically without making another checklist on the side. Is there any way to make another line? dcc.Checklist( id="slot-filter", options=[ …
0
votes
1 answer

How to plot a stacked bar graph for 1d data(series) using plotly low level interface?

I am trying to replicate a stacked bar graph of a 1d data(series), something like this, stacked bar graph using plotly high level using plotly low level interface. I have used high level interface to get the above output. Below is the code I…
Maran
  • 68
  • 5
0
votes
1 answer

How to change the colours in plotly heatmap

I have the following sample dataframe matrix below which I generated using some functions I created: Loan_ID Gender Married Dependents Education Loan_ID 1.000 NaN NaN 0.000 0.000 Gender …
JA-pythonista
  • 1,225
  • 1
  • 21
  • 44
0
votes
2 answers

Python Plotly : Set individual fixed height and width for all subplots when using facet_col

When setting a fixed height, e.g. height=400, while using facet_col, the height and width of each individual subplot are distributed among the overall height and width of the plotly chart area. If the number of subplots is variable, then so is the…
quadratecode
  • 396
  • 1
  • 2
  • 12
0
votes
1 answer

How do I add two separate text annotations to a single bar chart?

I have this plot - import plotly.graph_objects as go animals=['giraffes', 'orangutans', 'monkeys'] fig = go.Figure([go.Bar(x=animals, y=[20, 14, 23])]) fig.show() I want to add two different text annotations. I want to have one text annotation…
Cauder
  • 2,157
  • 4
  • 30
  • 69
0
votes
1 answer

Change color to a single point in plotly scatter 3D

I made a plotly 3D scatter: fig = px.scatter_3d(data, x = x, y = y, z = z, color=data['A'], color_continuous_scale=px.colors.diverging.Spectral_r, color_continuous_midpoint= 0, …
Adrian
  • 177
  • 9
0
votes
1 answer

Plotly, mixed px.timeline chart with go.Figure to generate one visual and html file

I hope to create a visual (subplots) with a px.timeline chart and go.Table, basically put the two figures on the same page and generate a html file. Here is the sample data & unfinished code: from plotly.subplots import make_subplots import pandas…
XaviorL
  • 373
  • 1
  • 13
0
votes
1 answer

python plotly: how to display additional label on hover

I have two area subplots and when I hover over the plot, it displays the value of Val_2 and Val_Yellow. The dataframe contains a column called "Diff" that is the difference between Val_2 and Val_Yellow. How can I display Diff and its value in the…
user9532692
  • 584
  • 7
  • 28
0
votes
1 answer

How does scatter plot works in plotly?

How does plotly plot a scatter plot? What is the logic behind it? If I have a NumPy array-like import numpy as np arr = np.array([[1,2,3,1,2,3,4],[1,1,1,1,1,-6,4],[0,0,0,0,0,0,4],[-3,-2,-1,1,2,3,4],[1,1,15,1,2,-999,4]]) and I am using the following…
Mr.J
  • 181
  • 1
  • 10
0
votes
1 answer

Plotly line and bar graph in the same figure

I tried to plot a bar chart then and a line chart in the same figure with Plotly, but somehow only the later trace is showed in the plot, and I'm not sure what went wrong. Below is the code with Bar only fig = go.Figure() fig.add_trace(go.Bar( …
1cjtc jj
  • 77
  • 4
0
votes
1 answer

Change colorscale of marker with update menu (without repeating data)

I'm trying to create a scatter plot with a menu to change the colorscale. I started from this example on the documentation, and the goal would be to get something similar to this one but without using Dash. Here is a minimal code to reproduce the…
Filipe
  • 532
  • 4
  • 16
1 2 3
99
100