My python code creates a plotly bar plot, but the background is white in color. I want to change it into transparent color. Is that doable?
My Code:
import plotly.plotly as py
from plotly.graph_objs import *
py.sign_in('username', 'api_key')
data =…
I have the following code to create the line plot with Plotly. How can I set the range of Y axis to always have it in [0; 10]?
layout = go.Layout(
title=go.layout.Title(
text="Test",
xref='paper',
x=0
…
I have made a scatter plot using matplotlib and Plotly. I want the height, width and the markers to be scatter as in matplotlib plot. Please see the attached plots.
I used the following code in Plotly
import plotly
import plotly.plotly as py
from…
Normally in a jupyter notebook I would use %matplotlib notebook magic to display an interactive window, however this doesn't seem to work with google colab. Is there a solution, or is it not possible to display interactive windows in google colab?
How can I set the color of a line in plotly?
import plotly.graph_objects as go
from plotly.subplots import make_subplots
fig = make_subplots(rows=2, cols=1, subplot_titles=('Plot 1', 'Plot 2'))
# plot the first line of the first…
I am trying to learn Plotly by firstly creating a simple bar chart in Plotly Express and then updating it with Plotly to finesse it. I would like to hide the legend.
I am trying to update the original figure by hiding the legend, and I can't get it…
Plotly Express allows me to easily plot a pandas dataframe, as explained in their examples. Rather than using a named column for x and a named column for y, I would like to use the dataframe's index for x and a named column for y.
Example using…
I want to change the variable/label names in plotly express in python. I first create a plot:
import pandas as pd
import plotly.express as px
d = {'col1': [1, 2, 3], 'col2': [3, 4, 5]}
df = pd.DataFrame(data=d)
fig = px.line(df, x=df.index,…
However, I feel saving the figure with plotly.express is pretty tricky.
How to save plotly.express or plotly plot into a individual html or static image file? Anyone can help?
I am using plotly for python and I can't set x and y axis so they could have the same scale:
Here is my layout:
layout = Layout(
xaxis=XAxis(
range=[-150, 150],
showgrid=True,
zeroline=True,
showline=True,
…
Here is my dataset:
After locking my dataframe by year and grouping by month, I proceed with calculating percentage increase/decrease as a new column; it ends up looking like this:
Now for my Plotly plot I use this to display traces and add some…
I just installed plotly express. And I am trying to do something simple - plot each column of my data frame on the same y-axis with the index as x-axis. Here are questions/observations:
Is it necessary for the data frame to have index as a column to…
We are trying to produce a real-time dashboard in plotly-dash that displays live data as it is produced. We are generally following the guidance here (https://dash.plotly.com/live-updates).
We have a callback that gathers a chunk of new data points…
I recently discovered plotly and find it really good for graphing, now I have a problem which I want to save multiple plot into a single html, how to do it please?
*I want to save multiple plot, i.e fig, fig1, fig 2 and so on, NOT one subplot which…
There are many questions and answers that touch upon this topic one way or another. With this contribution I'd like to clearly show why an easy approch such as marker = {'color' : 'red'} will work for plotly.graph_objects (go), but color='red' will…