I am trying to highlight timeperiods in Plotly. I seems like the best way is to use Shapes, like this, but in the real world you do not want to add each shape manually like in the example url. I am thinking a for loop is the best solution, but open…
I'd like to add quivers to an existing figure with plotly (python). But the only peace of documentation I could find either create only one quiver (here) or a brand new figure (there).
Here's the example on plotly doc :
import plotly.figure_factory…
I am trying to use plotly to compare the coefficents of regression models using error bars for the confidence intervals. I used the following code to plot it, using the variable as a categorical y axis in a scatter plot. The problem is that the…
I'd like to add a trace to all facets of a plotly plot.
For example, I'd like to add a reference line to each daily facet of a scatterplot of the "tips" dataset showing a 15% tip. However, my attempt below only adds the line to the first…
I'd like to change the order of the items in the legend of a plotly.express bar plot.
For example, I'd like to show Dinner before Lunch on this plot (the current behavior is especially awkward with horizontal bar plots, since the order of the bars…
I would like to modify the hovertemplate of a plotly histogram. So far, couldn't find a way to:
Round the values given
Remove the name of the histograms (here: '2012', '2013')
Add a name to indicate what the values represent
Desired…
I am using the below code to display x and y values on plotly dash. But then i want to be be able to add a another text field below the "value" textfield.
The text field would be called "Category" so that if the y value displayed is:
5k then…
My setup is quite straightforward, but it fails to run. I suspect it has to do with the server address (I think it should be https://127.0.0.1:8050) but have no idea how to change that. Any suggestions highly appreciated.
- Setup an virtual…
I am trying to show a spinner when a Dash figure is updated using the CSS attribute data-dash-is-loading.
I found a working solution but would like to know why my previous approach does not work to get more insight.
The structure of the document is…
I have a dataframe 'df' with 36 columns, these columns are plotted onto a single plotly chart and displayed in html format using the code below.
import plotly.offline as py
import plotly.io as pio
pio.write_html(py.offline.plot([{
'x':…
How do you copy a plotly figure object in order to make a few changes but keep the same basic structure for other plots?
The following raises an Attribute error:
Code:
fig2=fig1.copy()
Error:
AttributeError: 'Figure' object has no attribute…
I'm trying to assign color for each class in my dataframe in plotly, here is my code:
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33, random_state=42)
knn = KNeighborsClassifier(n_neighbors=7)
# fitting the…
I am trying to use plotly in python to create box plots, but I just want the points, not the box, whiskers or anything else. Something like this:
Couldn't find a way to do that. The best I could do is set boxpoints='all', but that only displays the…
When I try to plot a Plotly graph, the height is set to near 0 or something, because the graph renders collapsed. What I'm seeing:
However, if I manually set the graph's height, it renders correctly. How can I get the graphs to render correctly…
I have a large dataset of around 500 parquet files with about 42 million samples.
In order to read those files I'm using Dask which does a great job.
In order to display them, I downsampled the Dask DataFrame in the most basic way (something like…