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
0 answers

Plotly Express - How to remove unwanted line after update?

I am trying to create a graph of sales using px.line. I create an initial plot and then repeatedly update the same one with forecasted data. The issue is that once I make the update, the line that was part of the previous forecast seems to remain…
0
votes
2 answers

Python/Plotly: px bar customize hover

Having this dataframe: df_grafico2 = pd.DataFrame(data = { "Usos" : ['Total','BK','BI','CyL','PyA','BC','VA','Resto','Total','BK','BI','CyL','PyA','BC','VA','Resto'], "Periodo" : ['Octubre 2021*','Octubre 2021*','Octubre 2021*','Octubre…
0
votes
0 answers

How can address this python plotly.express error: "Mime type rendering requires nbformat>=4.2.0 but it is not installed"

I faced a problem in python and was wondering if someone is able to help me solve it. I get below error when I try to use the the "show()" function for “plotly.express” library. ValueError: Mime type rendering requires nbformat>=4.2.0 but it is…
0
votes
1 answer

Is highlighting a segment of px.scatter_mapbox plot possible?

Using Dash graphs to create a placeholder for scatter line plot and scattermapbox. html.Div([ html.Div(id='graphs', children=[ dcc.Graph({'type':'graph', 'index':1}, figure=blank_fig('plotly_dark')), dcc.Graph({'type':'graph',…
Richard Wheeler
  • 618
  • 2
  • 8
  • 21
0
votes
1 answer

Get a separate bar for each row in Plotly when data has duplicate categories

I have a very simple dataframe with some duplicated category values: import pandas as pd df = pd.DataFrame({'x': ['Alpha', 'Beta','Beta','Beta','Gamma','Delta','Delta'], 'y':…
0
votes
0 answers

Is there a reason why a Plotly Express graph animation works, but using PyWebIO's put_html(), it doesn't?

I am using Plotly Express to make an animated graph, and the output is perfect. But when I try to use this function in my PyWebIO app using put_html(), the animation of the markers over time does not work as intended. The output from Plotly seems to…
0
votes
1 answer

Why is my plotly offline not being embedded in a dominate page?

I am creating a map with plotly.express and creating a html page with dominate I have not had any problem with the dominate part and I can create a separate html page with the map part. My problem is that when I try to take the map into a html code…
KansaiRobot
  • 7,564
  • 11
  • 71
  • 150
0
votes
1 answer

Plotly Express: Writing image not working, processes for several minutes until Keyboard Interrupted

Attempting to save a figure to my computer, and no matter what I try, it just does not work! Here's what I'm exactly trying to save, and the code block just continues to "run" until I Keyboard Interrupt. import plotly.express as px import plotly.io…
scerva
  • 55
  • 3
0
votes
1 answer

Change properties of a trace added to a faceted plotly scatterplot

I am attempting to change some of the properties of a trace I've added to each facet of a plotly scatterplot. Essentially what I'm trying to do is add a reference y=x line to each of these plots, and from what I've seen it appears using…
0
votes
1 answer

How to add a box plot and a vertical line in a histogram diagram in python Plotly Express graph objects subplots

Below is the data that is used to create the histogram subplot charts in ploty express graph objects. Below code is used to create histogram subplot charts in ploty express graph objects. import plotly.express as px import plotly.graph_objects as…
WF30
  • 213
  • 1
  • 3
  • 16
0
votes
0 answers

Plotly Express is showing a blank space placeholder as graphic

I am using the Full Docker version of PyCaret. I am running it in an azure web app for containers. After reading similar questions: plotly express sunburst plot complete blank Plotly Express Scatter_Mapbox Returns Blank I tried to plot simple…
Yarini
  • 1
0
votes
1 answer

How to custom order the x axis category orders in plotly express subplots

Below shown is the data to plot the bar chart in plotly express subplots Below is the syntax is used to create the bar chart in plotly express subplots by using category_orders to customize the order of the x axis's. import plotly.express as…
WF30
  • 213
  • 1
  • 3
  • 16
0
votes
1 answer

How to add a Pie chart and grouped Bar chart on plotly express subplots

Below is the syntax used to get the pie chart and grouped bar chart using plotly express subplots import plotly.express as px import plotly.graph_objects as go from plotly.subplots import make_subplots specs = [[{'type':'pie'}, {"type":…
WF30
  • 213
  • 1
  • 3
  • 16
0
votes
0 answers

Changing font size (or tick mark spacing?) of plotted x axis values

I found some article about changing the font size of the actual x axis TITLE but what I would like to do is see if I can make the font for the actual values small enough so that it shows the value for each point in the series. As in example image,…
DM71
  • 77
  • 1
  • 8
0
votes
0 answers

Plotly Treemap - Creating Treemap using Pandas Dataframe

I have a dataframe: df = pd.DataFrame({'type': ['flag', 'flag', 'sweets'], 'need_1': [['US'], ['Finland'], ['chocolate'], 'need_2': [['US', ['Britain'], ['licorice'], 'number': [2, 4, 5}) Type need_1 need_2 number …
Victoria S
  • 90
  • 7