plotly

Bar plot in Plotly with constant spacing between random dates

Bar plot in Plotly with constant spacing between random dates Question: I am trying to create a bar plot with px.bar from plotly.express with the following code: px.bar(data_, x=’DATE’, y=’Change’) DATE is a datetime column and my issue here is that I want constant spacing between dates i.e. I want the bars to side-by-side and …

Total answers: 1

Group-by using pandas and plot lines in Plotly

Group-by using pandas and plot lines in Plotly Question: I have the following df, and I am trying to build 2 different plots using Plotly. df = pd.DataFrame({‘weight’:[12,11,10,14,16,13,12,15,16], ‘height’:[110,111,116,111,110,113,115,114, 112], ‘name’:[‘Adam’, ‘Steve’,’Mike’, ‘Adam’, ‘Adam’, ‘Steve’, ‘Mike’,’Mike’,’Steve’], ‘category’:[1,1,2,2,1,2,1,1,1]}) The first plot I am trying to build is to groupby the df by ‘name’ and plot weight …

Total answers: 1

Remove Data from X Axis Labels plotly

Remove Data from X Axis Labels plotly Question: Is there a way to remove the x axis data from the x axis? I need the labels, just not the data/volume. (i.e display "Example A", not "Example A 7000") labels = ["Example A","Example B","Example C","Example D","Example E","Example F","Example G","Example H","Example I","Example J","Example K","Example L","Example M","Example N","Example …

Total answers: 1

Dash With Plotly Only Updates Graph Once, But Never Again?

Dash With Plotly Only Updates Graph Once, But Never Again? Question: I’m trying to make an interactive heatmap for baseball. The input/selection is from a dropdown menu, and the output is a heatmap for that player. However, for some reason, the graph only updates once! Let me explain: If I use initial value ” for …

Total answers: 1

How can I combine a scatter plot with a density heatmap?

How can I combine a scatter plot with a density heatmap? Question: I have a series of scatterplots (one example below), but I want to modify it so that the colors of the points in the plot become more red (or "hot") when they are clustered more closely with other points, while points that are …

Total answers: 1

Plot bar chart with separate color legend – dash Plotly

Plot bar chart with separate color legend – dash Plotly Question: I’m trying to plot certain values using dash as a bar chart but use a separate column to map the colors. Using below, I’m plotting dates as a bar-chart that corresponds to a drop down bar. Is it possible to keep the dates as …

Total answers: 1

Set specific colour map to Bar-chart with callback – dash Plotly

Set specific colour map to Bar-chart with callback – dash Plotly Question: I’ve got an interactive bar chart that displays counts from days of the week. I’m trying to set the color map so each day of the week maintains the same color. At the moment, if I remove any days, the color changes. Separately, …

Total answers: 2

Callback error with barchart – Plotly dash

Callback error with barchart – Plotly dash Question: I’m trying to insert an interactive bar-chart using values in a df. Using below, I’ve got the unique values from Type displayed as RadioItems. I’m aiming to link these to a bar chart within the dbc.Container. The first 5 rows of the df are displayed below. I’m …

Total answers: 1

Raspberry Pi No module named Plotly

Raspberry Pi No module named Plotly Question: I have installed plotly on the Raspberry Pi. The objective is connecting to a remote MySql database and plot interactive time-series plots (that would update as the new data arrives into the MySql database). But I am running into no module found even after installing it. Looks like …

Total answers: 2