I am trying to create a gif made out of plotly graphs. And this works surprisingly well!
The only problem I’m having, is that I haven’t found the correct setting for fixing the stretching of the axes.
So far, I was able to create this gif
(I cannot…
The Plotly express lowess trendline is providing a very poor fit. In some situations, it works well but with this particular data, it is does not.
When I make the lowess trendline using statsmodels.nonparametric.smoothers_lowess.lowess() I get a…
Okay, so my initial idea is to make a line plot in plotly and color the line with one color after certain threshold t, and another color before the threshold. It works for a 23 or less points, but it works with no more, using this method:
import…
I want to plot several images with imshow from plotly and give each image a title.
My code is
fig = px.imshow(numpy.array(img1,img2), color_continuous_scale='gray', facet_col=0, labels={'facet_col' :…
I want to change the colour scheme of the 3D surface plot in the plotly python. Plotly assigns the colour scheme by default as shown in figure below.
Here is my code
import import plotly.graph_objects as go
import pandas as pd
data =…
Using Plotly I want to change the xticks labels to custom labels. (Something like 'Area1', 'Area2', 'Area3'....)
Where and how I need to add the code?
Currently, it is taking the xtick labels directly from the dataframe.
Following is the code for…
import plotly.graph_objects as go
import numpy as np
import numpy
# Download data set from plotly repo
pts = np.loadtxt(np.DataSource().open('https://raw.githubusercontent.com/plotly/datasets/master/mesh_dataset.txt'))
x, y, z = pts.T
US = [(1970,…
Given the following chart created in plotly.
I want to add the percentage values of each count for M and F categories inside each block.
The code used to generate this plot.
arr = np.array([
['Dog', 'M'], ['Dog', 'M'], ['Dog', 'F'], ['Dog',…
I am trying to find and annotate the intersection point of two-line using Plotly. I know we can use (plt.plot(*intersection.xy,'ko')) to get the intersection point in Mathplotlib, but how can do it in plotly or if it can be done.
import numpy as…
Using Plotly for a bar plot preserves the dataset's order when not using color:
import pandas as pd
import plotly.express as px
df = pd.DataFrame({'val': [1, 2, 3],
'type': ['b', 'a', 'b']},
index=['obs1',…
I am trying to plot this time-series chart (a RSI chart of a few stock tickers). However, I cannot seem to get Plotly to chart at all! And it throws me the error below:
Value of 'x' is not the name of a column in 'data_frame'. Expected one of…
I would like to plot a line with a range around it, like on this photo:
I posted an original question, but didn't specify the index being a datetime index. I thought it wouldn't be important, but I was wrong.
There is an answer that covers it with…
Is there a way to change the id of a plotly figure in python?
For example if I run this code taken from the plotly webpage:
import plotly.graph_objects as go
fig = go.Figure()
config = dict({'scrollZoom': True})
fig.add_trace(
go.Scatter(
…
I'm developing a dashboard application using dash/plotly in Python.
I need to build a map with more than 1000 traces. Because of performance issues, I'm trying to use one single Scattergeo object, but, ordinarily, it does not provide a way to plot…
I have a multi-tab, subtabs dash application. I'd like to be able to save/persist the state of the components in different subtabs when switching between them. These components are dropdown, input, graph, slider, daterange etc.
I use the persistence…