The plotly.express module (usually imported as px) contains functions that can create entire figures at once, and is referred to as Plotly Express or PX. Plotly Express is a built-in part of the plotly library, and is the recommended starting point for creating most common figures.
Questions tagged [plotly-express]
365 questions
0
votes
1 answer
Poltly Express `scatter_mapbox` with `animation_frame` and `color`
If have data with columns : 'e_lat', 'e_lon', 'Année' and 'Expéditeur'.
I'm trying to make a scatter_mapbox, with frames animated by 'Année", and color based on 'Expéditeur' (which is categorical, the names of the persons).
# I created a row…

sugnavurze
- 21
- 3
0
votes
1 answer
Plotly figure not showing with IPython
I'm trying out plotly express by pasting the official example in an IPython console.
requirements.txt
ipython
plotly
pandas
Run the below
import plotly.express as px
if __name__ == "__main__":
import IPython; IPython.embed(using=False)
Paste…

Pithikos
- 18,827
- 15
- 113
- 136
0
votes
1 answer
In a Plotly timeline Gantt chart, how to have each y-axis category ("task") in a new line, even for repeating tasks?
The default code (taken from the Plotly Gantt chart intro) has each repeating tasks added to the same horizontal line in the figure. For example, the code:
import plotly.express as px
import pandas as pd
df = pd.DataFrame([
dict(Task="Job A",…

symduk
- 78
- 1
- 7
0
votes
0 answers
Plotly Express in Spyder IDE
How can i use Ploty Express in Spyder IDE?
I have tried the suggestion from this link. But i couldn't make it work. It is not even opening my default web browser (Google Chrome). Instead, it opens Internet Explorer in the main page.
I am trying…

Murilo
- 533
- 3
- 15
0
votes
0 answers
Plotly animation with images are very slow. What optimizations can be done?
Can anyone help me understand why the frame playthrough is so slow? This is just an example of a process I want to implement over 100s of images with data points. When I did add the play button it would not be able to load the image fast enough…

JON
- 23
- 1
- 5
0
votes
0 answers
How to add legend for picture?
Can anybody offer some information about how to add a plotly image as an object in the legend that I can click to trigger it on or off? Just like how the scatter plot can be triggered on or off, I want the same capability for the image.
import numpy…

JON
- 23
- 1
- 5
0
votes
1 answer
Using plotly express to show image and plot with animation
I need some help making an animation with plotly express where each frame will include an image and a graph (preferably a plotly express graph) side by side. My goal is to have the animation be corresponding to time steps from each frame. Plotly…

JON
- 23
- 1
- 5
0
votes
2 answers
Mixed plot compbining Plotly express scatter and go.Table
I want to generate a subplot figure with 2col, 1 row with:
row1,col1: px.scatter plot
row1,col2: go.Table
it should look like this:
I am unable to put the figures together, this is the code so far, it generates the table, and commented out is the…

Leo
- 1,176
- 1
- 13
- 33
0
votes
1 answer
How to show state boundaries only for US on a world scatter_geo?
I'm using plotly express scattergeo to plot some data points on a world map but I also like to have the US be shown at the state level. The 'world' scope doesn't react to the showsubunits argument when I use:
fig.update_geos(
visible=True,…

MikeRD
- 23
- 4
0
votes
1 answer
Choropleth: animation_frame does not working to create the graph on colab
I am facing a problem with Cloropleth when I try to use the animation_frame and geojson together.
If I run my code using the geojson on the colab, it generates the graph. However, if I try to animate it, the colab runs out of time and does not…

Yuri Santos
- 55
- 7
0
votes
1 answer
Passing a list of dataframe column names to Plotly Express Treemap
I'm trying to create a a treemap in Plotly Express. If I manually enter the column names, the treemap is created. Passing a list of the same column names throws a ValueError.
Essentially I have a dataframe with column names 3,4,5,6,7,8,9,10
Because…

Lee Roy
- 297
- 1
- 11
0
votes
2 answers
Plotly Express Scatter_Mapbox Returns Blank
I'm using plotly express, specifically scatter_mapbox to plot some locations on a map. This morning it was working fine via Jupyter Notebook. I wanted to save it so I called fig.write_image(), I got an error saying I need to install Kaleido, which I…

RRUDARY
- 71
- 1
- 1
- 10
0
votes
1 answer
Horizontal colorscale Plotly Express
Is there a possibilty in Plotly Express to set the color scale horizontal under the graph.
Here is my code:
import plotly.express as px
fig = px.scatter(df, x="year", y="Temperature", trendline="ols",
color="Temperature",…

saibot_90
- 39
- 6
0
votes
1 answer
Plotly Express rename axis (figure shows no axis name)
I'm trying to give a name to the axis of my graph with plotly express, but the figure shows no axis name. I would like that Y was called "$$$" and X was called "years".
Any idea of what is wrong?
Thank you!
This is my code:
def…

Simone Romeo
- 59
- 3
- 11
0
votes
0 answers
plotly-express choropleth-map values allready in geojson-file
i was able to create a choropleth map using plotly-express and a geojson file and a datasource (*.csv-file). The data from the *.csv file is plotted on the geojson-file.
See below code i used.
But what if the data is allready in the geojson file? So…

HzM74
- 71
- 7