Questions tagged [plotly-python]

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

References:

2059 questions
4
votes
2 answers

jupyterlab-plotly build npm extensions failed to install on Linux

This is to help those who face a similar issue. My builds were failing when trying to install the jupyterlab-plotly extension. My Jupyter Lab version is Version 1.2.6. The log was as follows: [LabBuildApp] Building in…
dmbhatti
  • 314
  • 2
  • 11
4
votes
2 answers

AttributeError: 'Figure' object has no attribute savefig in Flask

I am trying to display plotly.express bar chart in Flask. But it is giving 'Figure' object has no attribute savefig error. The image gets displayed correctly while using fig.show(). import matplotlib.pyplot as plt import plotly.express as px figs =…
John
  • 740
  • 5
  • 13
  • 36
4
votes
2 answers

Unintended Additional line drawn by Plotly express in Python

Plotly draws an extra diagonal line from the start to the endpoint of the original line graph. Other data, other graphs work fine. Only this data adds the line. Why does this happen? How can I fix this? Below is the code temp =…
crwarwa
  • 121
  • 1
  • 2
  • 10
4
votes
2 answers

Plotly: How to make a 3D stacked histogram?

I have several histograms that I succeded to plot using plotly like this: fig.add_trace(go.Histogram(x=np.array(data[key]), name=self.labels[i])) I would like to create something like this 3D stacked histogram but with the difference that each 2D…
J Agustin Barrachina
  • 3,501
  • 1
  • 32
  • 52
4
votes
1 answer

Add node count to Plotly Sankey diagram

I would like to add node count to each node in a Plotly Sankey diagram (https://plot.ly/python/sankey-diagram/) to look like the count referenced by red arrows. Is this possible? I cannot find example of this in plotly. The example, I provided…
fcol
  • 169
  • 3
  • 15
4
votes
0 answers

plotly contour plot with animation

Problem I'm attempting to animate a scatter/contour plot using Plotly. I've managed to animate the scatter plot, however, when attempting to include any contour, it disappears immediately after initiating the animation. If possible, I would like the…
Josmoor98
  • 1,721
  • 10
  • 27
4
votes
1 answer

Animation on top of static plot on plotly

I am new to plotly on python. I tried to create a dynamic plot on top of static plot. I have a dataframe df as follow: Date | Time | Easting | Northing | Truck ID ========================================================== 30/01/2019|…
Bernando Purba
  • 541
  • 2
  • 9
  • 18
4
votes
3 answers

How to make mixed statistical subplots using plotly in python?

I have some dataset in csv files(3 at total) and need to represent it in differents ways. They are necessarily line charts, box plots and histogram with kde(kernel density estimation). I know how to plot them individually, but to make it more…
Gastyr
  • 123
  • 1
  • 8
4
votes
2 answers

Plotly: How to plot a regression line using plotly and plotly express?

I have a dataframe, df with the columns pm1 and pm25. I want to show a graph(with Plotly) of how correlated these 2 signals are. So far, I have managed to show the scatter plot, but I don't manage to draw the fit line of correlation between the…
moro_92
  • 171
  • 1
  • 2
  • 10
4
votes
1 answer

display datatable after filtering rows from dropdown list in dash

I'm new to Dash. I would like to make a app, where I can select values from dropdown filter, filter dataset and display the data table. I'm using dash_table. My example app code is below. No datatable is shown. Does anyone know what I did wrong?…
zesla
  • 11,155
  • 16
  • 82
  • 147
4
votes
1 answer

Pyqt5/Pyside application with Ipywidgets and Interactive figures

I’m building a GUI (pyqt or pyside) to easily create complex figures (e.g. with plotly) for users. So far so good, I run the data processing and produce plotly figures that are exported as html and read by QwebEngineView. I even created a qt widget…
Luiz Tauffer
  • 463
  • 6
  • 17
4
votes
1 answer

Plotly sunburst plot not showing in Jupyter notebook

I am using Plotly and Jupyter to generate some visuals to better understand user journeys online. I am using the Plotly sunburst chart since this makes a great visual for that purpose. Plotly provides an example that works great and provides the…
Droid
  • 83
  • 1
  • 6
4
votes
1 answer

Draw multiple arrows using plotly python

There is an example about multiple annotations, it simply duplicate the go.layout.Annotation() to draw 2 arrows. But I need to draw more than 100+ arrows, I don't know how. The go.layout.Annotation() is tuple type and accepts dict() for each arrow,…
ERIC
  • 460
  • 6
  • 16
4
votes
1 answer

tickformat in Plotly Python

I am trying to format my Plotly Bar Chart x-axis to percentages with 3 decimal points. import chart_studio.plotly as py #for plotting import plotly.graph_objs as go y = ['niner', 'deuce', 'checker'] x = [0.03, -0.05, 0.075] fig =…
dsugasa
  • 663
  • 1
  • 9
  • 26
4
votes
1 answer

facet labels in plotly

I'd like to change the facet labels in a plotly(_express) plot. Here's the plot: import plotly.express as px tips = px.data.tips() fig = px.scatter(tips, x="total_bill", y="tip", color="smoker", facet_col="sex") fig.show() What I'd like is to…
RoyalTS
  • 9,545
  • 12
  • 60
  • 101