Questions tagged [plotly-python]

Use this tag for questions about the interactive graphing library for Python.

References:

2059 questions
3
votes
4 answers

How do I split a grouped bar chart into sub-groups?

I have this dataset- group sub_group value date 0 Animal Cats 12 today 1 Animal Dogs 32 today 2 Animal Goats 38…
Cauder
  • 2,157
  • 4
  • 30
  • 69
3
votes
1 answer

Adjusting the plotly colorbar for each subplot according to their min and max

I wanted to find out how to have three different colorbars for my plotly 3 subplots and be able to adjust each of the three colorbars according to their min and max. (attached snapshot). Does anyone know how to have each colorbar on the right side…
3
votes
3 answers

Multiple imshow on the same plot, with opacity slider

With Plotly, I'd like to display two imshow on the same page, at the same place, with opacity. This nearly works: import plotly.express as px, numpy as np from skimage import io img =…
Basj
  • 41,386
  • 99
  • 383
  • 673
3
votes
1 answer

create a cartesian 2D plane coordinate system using plotly

This creates the graph that I'm talking about using matplotlib: import matplotlib.pyplot as plt import numpy as np xmin, xmax, ymin, ymax = -9, 9, -9, 9 fig, ax = plt.subplots(figsize=(20, 20)) ax.set(xlim=(xmin - 1, xmax + 1), ylim=(ymin - 1,…
3
votes
1 answer

Plotly/Python creation of the nested x-axis bar-chart

I was wondering if Plotly can start support for nested X /multiple X axis? For instance if one is using standard “tip” data, adding a capability as implemented in (fivecents plot, JMP or Origin ) would be beneficial. i.e. import plotly.express as…
P Kuca
  • 31
  • 2
3
votes
1 answer

How to graph only time data with 12-hour format in Python

I need to create a graph that will show times in a 12-hour format on a daily basis. The message dict will contain the following: "messages": [ { "timeStamp": "Aug 17, 02:29 PM", "summary": "Could not reach the endpoint",.. I want the graph to show…
David W.
  • 31
  • 2
3
votes
1 answer

‘update_layout’ in plotly not working after a few clicks

I have a dropdown menu where I can choose the x- and y-axis variables for a scatter plot. Moreover, a categorical variable can be selected in the menu indicating how to color the points. This seems to work for a few clicks, but then I am getting…
3
votes
0 answers

how to make the rounded border of the vertical bars in bar-chart in plotly dash

I am trying to make the vertical bars rounded from the top side but I am not able to figure out which attribute suits this. I found out on Github that this feature has not been yet implemented. So is there any other way to achieve the same? Bar…
3
votes
3 answers

Plotly in python: Exporting to .eps - poppler library not found on path using windows

I've been using plotly a lot for creating graphs and visualizations. I'm working in jupyter notebooks on my local machine (Windows). For a specific use case, I am now required to save these graphics in high resolution .eps files. However, I can't…
3
votes
0 answers

Plotly animation in Python: play button resets view angle unwantedly

FWIW: working on Python 3.10, Plotly 5.5.0, streamlit 1.8.1; OS: Ubuntu (WSL2). I have successfully used the plotly.graph_objects Figure object in the plotly API to build a 3D plot that gets animated (using frames in the Figure) when pressing a…
3
votes
1 answer

Python Plotly chart update with two dropdowns

I am trying to build a plotly scatterplot in Jupyter Lab to be able to see dependencies between various columns in a DataFrame. I want to have two dropdown menus (corresponding to the X and Y axes), in each of which a full list of the DF columns…
3
votes
1 answer

How to specify the x coordinate on a grouped bar chart on plotly?

I made a bar chart with python plotly, and I want to put a marker on a particular bar, example non-smoking females. Does anyone know how to specify this? I took an example from the plotly documentation, if I try to put the marker it just takes the…
3
votes
0 answers

Reducing and plotting 3d point cloud to a 3d heat map in python?

I'm working with a 3D set of (x, y, time) data. I'm trying to generate a heatmap of the (x,y) data over time in a smooth 3D heatmap. Plotly is preferred, but I'll take what I can get. Data is of this form: data_df =…
MLTQ
  • 51
  • 6
3
votes
1 answer

$ tick formatter in Plotly that respects negative values

Per the answer to Add Currency symbol in the y axis scale using plotly method in python, you can add a currency to a Python Plotly tick formatter via: fig.update_layout(yaxis_tickprefix = '$', yaxis_tickformat = ',.') However, this shows negative…
Max Ghenis
  • 14,783
  • 16
  • 84
  • 132
3
votes
1 answer

how to add confidence interval fillcontour using plotly express?

I am using plotly express to add trendline, now how to plot confidence interval like in seaborn regplot(), df = px.data.tips() fig = px.scatter(df, x="total_bill", y="tip", trendline="ols") fig.show()
roudan
  • 3,082
  • 5
  • 31
  • 72