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
Plotly Express: Plot Scatter MapBox with Feature Colors from DataFrame Column (px.scatter_mapbox)
How do you make Plotly Express plot points in the colors specified in a DataFrame column?
I have a DataFrame with columns: names, latitudes, longitudes, and colors as below:
df = pd.DataFrame({'name': pd.Series((1, 2, 3, 4), dtype='int32'),
…

j7skov
- 557
- 7
- 22
0
votes
0 answers
How does it make the background of that country? (Plotly)
I write python plotly express to make a choropleth map
this my code
import plotly.express as px
import pandas as pd
th_json = "https://raw.githubusercontent.com/apisit/thailand.json/master/thailand.json"
df = pd.read_csv("province-test.csv")
fig…

Uren
- 11
- 5
0
votes
1 answer
Multiple Input Callback in Plotly Express using dcc.DatePickerRange
I am using plotly express and dash to create my first live interactive dashboard. The current display is very basic just 2 graphs and a checkbox list for province. My next addition was going to be a date range picker from dash core components. …

timpetersonKFF
- 21
- 3
0
votes
2 answers
Size of bubbles in plotly.express.scatter_mapbox
I am trying to create a map with plotly.express that displays values are bubbles (circles).
The values currently range from 16000 to 21500. I have got everything up and running, the bubbles are displayed in different colors, however, they are more…

LordOfTheSnow
- 91
- 1
- 9
0
votes
0 answers
Formatting hover text in Plotly Express vertically
I’m attemping to display a list of values in the hovertemplate in plotly express
I have the list saved as a single string. It’s made up of 10-20 substrings broken up by commas
The default is for the list to displayed horizontally which doesn’t look…

phantom234234
- 83
- 7
0
votes
1 answer
How do I update my dash figure where new records are appended to a csv file every 15 seconds?
Background:
I have 2 csv files: c.csv, p.csv
Every 15 secs, a set of new records are appended to c.csv
Every 15 secs, a set of new records (but different from the c.csv set) are appended to p.csv
c.csv contains call options data for SPY (columns =…

Jason Park
- 77
- 1
- 1
- 10
0
votes
1 answer
Plot two traces from two different days to one graph based on x axis
I am trying to display data into one line graph with two traces where on x axis will be time from 00:00:00 to 23:59:59, on y axis 'down_speed' and each trace will be showing data from one day. For exapmle Trace1 from 27th April (00:43:02,…

Oremuss
- 3
- 2
0
votes
1 answer
Ploty Express Not Reflecting Legend / Scale on Map
I am working on composing maps with Plotly in Jupyter Notebook and most are working, but on some, it is not displaying properly - see photo.
I cannot seem to find out why it is not displaying or how to resolve it.
#DESTINATION Delay for each…

Jarred Parrett
- 101
- 1
- 5
0
votes
1 answer
How to pipe plotly line plot to pandas dataframe?
How can we use .pipe() to get plotly express line plot?
Code
import numpy as np
import pandas as pd
import seaborn as sns
import plotly.express as px
df = pd.DataFrame(data={'count':np.random.randint(1,20,10)},
…

BhishanPoudel
- 15,974
- 21
- 108
- 169
0
votes
1 answer
Matplotlib like graphs with plotly express
Following is my Pandas dataframe, its very easy creating a line plot for all the items with matplotlib. I just write
df.plot()
And it create a separate line for all the items, But I want to create same line plots with plotly express, But I am not…

Manu Sharma
- 1,593
- 4
- 25
- 48
0
votes
1 answer
Equivalent to sns.distplot(data, fit=scipy.stats.norm) with plotly
For a while, I've been using both seaborn and plotly for visualization, depending on my needs at the moment. Lately, I've been trying to move completely to plotly, but there are things that I still can't find out how to make it work.
For example, I…

sneaky_lobster
- 375
- 3
- 16
0
votes
0 answers
Matlib or Plotly Bar Chart Race Graph
I am wanting to produce a bar chart race, I'm not sure what the best way is. This is how I have my data at the moment, but I would want it to skip the 0's.
2019-01-10 2019-01-11 2019-02-10 2019-02-12 2019-03-10
1 0 0…

gazza81288
- 11
- 3
0
votes
1 answer
Plotly Express hovermode with arbitrary column
I see that the hovermode attribute in layout has options for x or y, but is it possible to use an arbitrary dataframe column? instead?
For example, I'm plotting precision-recall curves. The x-axis is recall, and the y-axis is precision. The…

Austin
- 6,921
- 12
- 73
- 138
-1
votes
1 answer
Plotly Express Bar chart (px.bar) labels option doesn't override Legend?
I'm trying to override the default legend labels in px.bar. Am I doing this correctly?
import plotly.express as px
df = px.data.stocks(indexed=True)-1
px.bar(df, x=df.index, y=["GOOG","AAPL"],
labels={
"GOOG":"Google",
…

Jeremy Yu
- 11
- 3
-1
votes
1 answer
I want to make an animated polar chart but the chart i get only has one radii with a list
med_spotify = spotify_data.drop(columns=['name', 'explicit', 'artists', 'key', 'mode', 'time_signature', 'tempo', 'duration_ms', 'loudness'])
med_spotify = med_spotify.groupby('release_date').median()
med_spotify =…

Teresa Cruz
- 3
- 4