Questions tagged [plotly-express]

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.

365 questions
0
votes
1 answer

How to enable plotply.express.timeline graphs to have different height and colors

I am trying to use the timeline chart show each row (Y-axis) with different heights in below chart. Code: import plotly.express as px import pandas as pd df = pd.DataFrame([dict(Task="Task1", Start='2017-01-01', Finish='2017-02-15', Phase…
Redox
  • 9,321
  • 5
  • 9
  • 26
0
votes
0 answers

Remove character from color variable plotly express

I try to make a stacked bar plot with plotly express. The only problem is that I'm not able to remove the '=' sign from 'region_txt' which I use to instantiate the variable 'color' with. Now my legend shows the '=' sign in front of the region names.…
Julius
  • 37
  • 4
0
votes
1 answer

How can I create a line plot with plotly_express, where a pandas dataframe can be selected over a drop down menu?

I want to create a line plot in which the underlying data can be selected over a drop down menu. The data is in a pandas dataframe and I am using plotly_express. I tried to use this post as a basis but it does not use plotly_express and the data is…
Aneho
  • 118
  • 7
0
votes
1 answer

How to show 'hour precision' on datetimes in Plotly express?

I've looked-up answers on all blogs in vain ... I'm simply looking for a way to show datetimes with hour precision on my graphs. Here's an example of what my code generates : My 'Start Date' & 'End Date' are normally on the following format…
Keyser Soze
  • 262
  • 3
  • 11
0
votes
1 answer

Choropleth Plotly calculation & dropdown

Im trying to make a simple choropleth diagram for a branch network in a country via plotly express. my aim is to create a map that shows total fee amount by city and be able to break it down by Fee names. when i run the code i can see the map and…
0
votes
0 answers

Financial Chart using Plotly Express won't run internally in PyCharm

I'm trying to set up a financial chart in Conda Pycharm IDE using Plotly Express, but for some reason I'm not able to run the script in Pycharm since the graph keeps opening in my chrome browser instead. I have already installed conda in the…
0
votes
1 answer

Plotly Express Heatmap not working properly

I'm a newbie in Python and i need your help for solving this tricky problem.. I created an heatmap graph with seaborn in order to show Project Managers allocation on projects, and it's owrking properly. ax =…
Lorenz
  • 1
  • 1
0
votes
2 answers

All plots show up in notebook, but nbconvert notebook to html, only latest plotly express plots show up

Background I'm working on a data challenge with 3GB data. I plotted about 10 plots using ploy-express in jupyter notebook. I didn't use fig.show('notebook') because it didn't work. I used py.init_notebook_mode(), all plots show up perfectly in…
0
votes
1 answer

Using a custom time format in Plotly Express timeline

I am using plotly express to make a custom timeline graph object and I want to edit the x(time) axis to display a different time format, but it will only allow for 'datetime'. Is there any way to use a custom time type in plotly using the timeline…
0
votes
1 answer

In Plotly Express Funnel how do you re-order de y-axis categories?

I have a DataFrame with all my data and i have the following stage order order = {0:'NEW',1:'FOLLOW_UP',2:'Demo',3:'QUOTE',4:'CLOSING'} fig = px.funnel(df, x='count', y='name', color='source',category_orders=order) My DataFrame is perfectly in…
0
votes
1 answer

Plotly: How to plot a multi-line chart?

I have a 2d list and I want to create a Plotly multi-line chart to represent this data. So far I've got this code: print(len(conv_loss),len(conv_loss[0])) print(np.array(conv_loss).shape) conv_loss_df = pd.DataFrame(data=conv_loss, index=namelist,…
Jonathan Woollett-light
  • 2,813
  • 5
  • 30
  • 58
0
votes
1 answer

Pie Chart from Dataframe

I'm trying to create a plotly.express pie chart from data that's in a data table. The data originates from a Mongo query, and these queries populate the data table. Using what I have here, the data table works as expected, but I have no pie…
0
votes
1 answer

Why do I have extra values on X-axis, with bar plot?

There are only [3,4,5,6,8] values for Cylinders in Auto.csv, but when I created a bar plot using plotly, I see that there is one extra value for Cylinder over X-axis which is 7. How to eliminate that additional point? Thanks in advance.
0
votes
0 answers

Choropleth Map with plotly.express doesn't show map, just legend

I copied the "Indexing by GeoJSON Properties" example as seen on the Choropleth Maps in Python page. The code was executed with no error but there was no map showing, only the legend. In addition, the 'box', 'pan', 'zoom' options show but don't…
Almog Woldenberg
  • 481
  • 1
  • 4
  • 9
0
votes
0 answers

Plotly express wont show `color` lines

I am trying to make a simple line plot using plotly express, of a data frame: diccionary = {'Bet_type': ['dozen', 'column', 'even_odd', 'red_black'], 'Max_money': [216, 329, 377,193], 'times_played':[51,83,594,202]} df =…