plotly

Using plotly express px.bar causes a shift in output

Using plotly express px.bar causes a shift in output Question: I am trying to print a bar chart using plotly express (px.bar). It is a yearly set of data from 2015 to 2022 but gets plotted from 2016 to 2023. Not sure why… Code to plot yearly returns. # plotting the yearly % returns fig …

Total answers: 2

how to format the y axis for a timedelta object in plotly express

how to format the y axis for a timedelta object in plotly express Question: I’ve seen several related questions, but none of the solutions so far seem to solve my problem. The problem is, that instead of e.g. "03:00:00" or similar I get 40T as label on the y axis for my timedelta object. It …

Total answers: 1

How to change point separator for the y-axis of a Plotly figure?

How to change point separator for the y-axis of a Plotly figure? Question: I’ve been working on a graph for days to summarize some results. However, I just got stuck trying to change the y-axis separator to "," instead of "." I resorted to ChatGPT, as I don’t have that much skill with the Plotly …

Total answers: 1

How to adjust steps of y-axis

How to adjust steps of y-axis Question: I have a plot in which I have two y-axis. The y-axis on the left represent the bar chart and the y-axis on the left represent the two lines. The problem is that the left y-axis currently creates individual steps for the y-axis values, which results in additional …

Total answers: 1

Plotly px.line – do not connect data points

Plotly px.line – do not connect data points Question: I have the below set up for a line graph (yes I know this is not yet a best practice re. data visualization…). I don’t want the line graph to connect the gaps. I tried many things yet it continues to fill the gaps. Any thoughts …

Total answers: 1

Plot difference between two Plotly hexbin maps

Plot difference between two Plotly hexbin maps Question: I’ve seen posts relating to plotting the difference between two hexbin maps in matplotlib. I couldn’t find anything executing the same process but for Plotly hexbin map box plots. If I have two separate hexbin subplots (t, y), is it possible to produce a single plot that …

Total answers: 1

Multiple callbacks to filter data – dash Plotly

Multiple callbacks to filter data – dash Plotly Question: I’m hoping to include multiple callbacks or combine them to filter data. These functions will be used to visualise graphs. The first callback returns point data if it’s within a designated region. It is assigned to a dropdown bar called area-dropdown. The dropdown bar and callback …

Total answers: 1

draw arrow and marker in plotly

Can I make an arrow disappear when I click on the legend of the marker using Plotly? Question: import plotly.graph_objects as go fig = go.Figure() x = np.array([0,1,2,3]) x_s = np.array([0,1,2,3]) y = np.array([1,1,2,3]) y_s = np.array([0,0,0,0]) fig.add_trace(go.Scatter( x=x_s, y=y_s, name=’Test’, marker=dict( size=10, cmax=1, cmin=0, color=’black’, colorscale="Rainbow_r", symbol=’circle’ # line=dict(color=line_colors, width=3) ), showlegend=True, hoverinfo=’text’, hoverlabel=dict(bgcolor="white", …

Total answers: 1